cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Custom webservice issue

adesai_87
14-Alexandrite

Custom webservice issue

This is regarding the case#15764286

 

Customer getting error "Client received SOAP Fault from server: Authentication of Username Password Token Failed " while running webservice.

 

1) New_Project folder from 2 environments - sandbox(Non-working) and test(working)

 

Sandbox is updated with windchill 11.1 M20-CPS16 : http://internal.ptc.com/salesforce/attachments/cases/15/76/42/86/sandbox.zip 

Test is on version  11.1 M10-CPS04 : http://internal.ptc.com/salesforce/attachments/cases/15/76/42/86/test.zip 

 

2) Client logs when the same web service hit on both the environments

 

Env : test : 

C:\Amazon_MCAD\DrawingAutomation\webservices>java -jar QueryObjectServiceClient.jar plastic_barrier_psu_octave.drw

Feb 26, 2021 7:11:51 AM [com.sun.xml.ws.policy.parser.PolicyConfigParser]  parse

INFO: WSP5018: Loaded WSIT configuration from file: jar:file:/C:/Amazon_MCAD/DrawingAutomation/webservices/QueryObjectServiceClient.jar!/META-INF/wsit-client.xml.

************************Revision Block*************************************

Feb 26, 2021 7:11:52 AM com.sun.org.slf4j.internal.Logger error

SEVERE: You must initialize the xml-security library correctly before you use it. Call the static method "com.sun.org.apache.xml.internal.security.Init.init();" to do that before you use any functionality from that library.

Username:drawingadmin

Password:XXXXXX

EPMDocumentVersion: 01

EPMDocumentDescription:

EPMDocumentCreatedBy: Alexander Savello

EPMDocumentCreatedOn: 06-21-2018

.

.

.

drwarray[0][8]:06-21-2018

*****************Variant Block******************

[com.ptc.jws.service.org.myorg.queryobjectservice.Element@234078, com.ptc.jws.service.org.myorg.queryobjectservice.Element@c77191, com.ptc.jws.service.org.myorg.queryobjectservice.Element@42b71d, com.ptc.jws.service.org.myorg.queryobjectservice.Element@50078a]

 

 

Env : sandbox :

 

C:\Amazon_MCAD\DrawingAutomation\webservices>java -jar QueryObjectServiceClient.jar plastic_barrier_psu_octave.drw

Mar 02, 2021 9:45:52 AM [com.sun.xml.ws.policy.parser.PolicyConfigParser]  parse

INFO: WSP5018: Loaded WSIT configuration from file: jar:file:/C:/Amazon_MCAD/DrawingAutomation/webservices/QueryObjectServiceClient.jar!/META-INF/wsit-client.xml.

************************Revision Block*************************************

Mar 02, 2021 9:45:55 AM com.sun.org.slf4j.internal.Logger error

SEVERE: You must initialize the xml-security library correctly before you use it. Call the static method "com.sun.org.apache.xml.internal.security.Init.init();" to do that before you use any functionality from that library.

Username:drawingadmin

Password:XXXXXX

Exception in thread "main" com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Authentication of Username Password Token Failed Please see the server log to find more detail regarding exact cause of the failure.

        at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193)

        at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:131)

        at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)

        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:203)

        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:290)

       

This is how we are invoking it from Creo,

 

try {

 

String

decryptedPassword = DecryptUtility

 

.decryptWithAES(ReadProperties.readProperty("getproperty.decryption.encryptedpassword"));

 

Credentials.setUsername(ReadProperties.readProperty("getproperty.windchillserver.username"));

 

Credentials.setPassword(decryptedPassword);

 

QueryObjectServiceImplService

service =

new QueryObjectServiceImplService();

 

QueryObjectServiceImpl

port =

service.getQueryObjectServiceImplPort();

 

port.queryPartFromLibrary("16-000828");

// fake call to avoid loading delay later

 

} catch (Exception

ex) {

 

logger.debug("Fake call failed...", ex);

 

}

 

 

But as we can see, Without Creo also, we are not able to hit this service (java -jar above) on sandbox while it works on test.

 

Followed the steps from Article: https://www.ptc.com/en/support/article/CS226238 and refer https://support.ptc.com/help/wnc/r11.2.0.0/en/index.html#page/Windchill_Help_Center%2FIEUG_UsernameAuthExample.html%23 however doesn't help.

 

Appreciate your inputs.

 

Regards,
Amar

ACCEPTED SOLUTION

Accepted Solutions
adesai_87
14-Alexandrite
(To:adesai_87)

Solved by importing java certificates [jssecacerts].

View solution in original post

1 REPLY 1
adesai_87
14-Alexandrite
(To:adesai_87)

Solved by importing java certificates [jssecacerts].

Announcements

Top Tags