I am working on a secure web service and have created client client using the wsimport tool.
The web service that I'm working on only sends the response when this request is received in the soap form in the top
& lt; Wsse: security xmlns: wsse = "http: //somename.xsd" & gt; & Lt; Wsse: UsernameToken XMLLs: wsu = "http: //somename2.xsd" & gt; & Lt; Wsse: username & gt; $ {= (Com.company.xxx.util.classname.getXXX ("SomeString"))} & lt; / Wsse: Username & gt; & Lt; / Wsse: UsernameToken & gt; & Lt; / Wsse: Security & gt; & Lt; / Soapenv: Header & gt; My question is how Do we need to add jar to contain the soap UI class? How does this work in Java code? Advance Note that A Edit by comment: I'm not sure, once the library is copied to that directory It went to in order to load the new libraries SOAPUI. If you are actually asking about this, but I give you a possible explanation: Because the WS I feel strange that you manually create Hope it helps, $ {= (com.company.xxx.util.classname works in SOAP UI tool) ? $ {= (com. Company.xxx.util.classname.getXXX ("some string")} This is not the language of expression (whose purpose is EL for JSP ...). SOAP of SOAPUI This is a specific notation for using groovy code inside the conflicts. groovy expression (As you use the $ {= groovy exp} notation in your SOAP request) you need to add jar libraries to the SOAPUI_HOME / bin / ext directory. $ {= groovy exp} by sending a request for SOAPUI device, SOAPUI Using Groovy first sends expression and value to WS. You can not use this notation in Java, and you can not send a SOAP request with your Java code:
com.company.xxx.util.classname.getXXX ("some string") will interpret the user's "string" value. Your client has to evaluate the expression com.company.xxx.util.classname.getXXX ("some string") , and change the value in your request before sending it to your WS, so request Send by your client should look for example:
& lt; Wsse: security xmlns: wsse = "http: //somename.xsd" & gt; & Lt; Wsse: UsernameToken XMLLs: wsu = "http: //somename2.xsd" & gt; & Lt; Wsse: username & gt; SomeUserName & lt; / Wsse: Username & gt; & Lt; / Wsse: UsernameToken & gt; & Lt; / Wsse: Security & gt; & Lt; / Soapenv: Header & gt; Although WSS headers normally to generate this header wss4j.jar < Some structures like / code> are used.
No comments:
Post a Comment