Hello everyone, I'm new in this forum, I'm from Poland and I'm studing informatic. I wan't to generate classes from WSDL given from WS in Internet Shop.
I'm using NetBeans 6.5 and trying generate code with JAXB. When i'm doing it an error occurs:
JAXB can only process XML schema - not WSDL files. The WSDL file is processed by the JAX-WS wsimport tool.
The WSDL uses the rpc/encoded messaging mode (Which style of WSDL should I use?) with SOAP encoding which is not supported by current generation SOAP stacks like JAX-WS, Axis2, or Apache CXF. Previous generation web service stacks like JAX-RPC or Axis 1.x may be able to process the WSDL and the associated SOAP messages. However SOAP encoding had lots of interoperability issues (which is why it is no longer supported).
I have WS in webshop and I'm trying to get orders via SOAP. I'm sending request and getting error:
I need to write my own Deserializer or what? Thanks in advance for any clue.
My 1st SOAP Client program:
//Edit:
I used wscompile.bat and i generated classes from WSDL file. My WebService is using RPC style, what should i do now with this classes, write something familiar to my program above? Or I'm completely lost? I want to send request to WS and get info about Orders. Thanks in advance for clues and replies.
Oskar Otw wrote:tried to make, with wsmiport, Client Side Skeleton without success
Peer Reynders wrote:
The WSDL uses the rpc/encoded messaging mode with SOAP encoding which is not supported by current generation SOAP stacks like JAX-WS, Axis2, or Apache CXF.
In other words: JAX-WS's wsimport cannot process a WSDL that uses the rpc/encoded messaging mode.
Oskar Otw wrote:Hmm, maybe i don't understand what i should do...
I have WS in webshop and I'm trying to get orders via SOAP. I'm sending request and getting error:
...
I need to write my own Deserializer or what? Thanks in advance for any clue.
It is likely that the SOAP stack doesn't support SOAP encoding at all.
You can try Apache Axis 1.4 and its WSDL2Java code generation tool.
However there still is a good chance that communication between the Axis Client and the SOAP encoded web service will still fail because of potentially divergent interpretations of the SOAP encoding "specification".
Hmm but like I said I had used wscompile.bat to generate code. Now i have planty of classes, and I want to connect with WS and get response, but when I'm trying simply code i need to implement all abstract methods, and i don't have any idea what should i put into them, my main.class:
Oskar Otw wrote:Hmm but like I said I had used wscompile.bat to generate code. Now i have planty of classes, and I want to connect with WS and get response, but when I'm trying simply code i need to implement all abstract methods, and i don't have any idea what should i put into them, my main.class:
But JAX-WS's wscompile aborted with errors so the code generation is incomplete. A web service consumer should not have to add any code to any abstract methods.
The Java API for XML-Based Web Services (JAX-WS) 2.1 (JSR 224) maintenance release 2 specification wrote:
1.2 Non-Goals
The following are non-goals:
...
SOAP Encoding Support Use of the SOAP encoding is essentially deprecated in the web services community, e.g., the WS-I Basic Profile excludes SOAP encoding. Instead, literal usage is preferred, either in the RPC or document style. SOAP 1.1 encoding is supported in JAX-RPC 1.0 and 1.1 but its support in JAX-WS 2.0 runs counter to the goal of delegation of data binding to JAXB. Therefore JAX-WS 2.0 will make support for SOAP 1.1 encoding optional and defer description of it to JAX-RPC 1.1. Support for the SOAP 1.2 Encoding is optional in SOAP 1.2 and JAX-WS 2.0 will not add support
for SOAP 1.2 encoding.
Witaj Oskar.
Netbeans 6.5 will download and generate everything you need. Do a right click on a project in the leftside menu, and choose to create a new Client Webservice. In the window that pops up, enter the url of the site you want to get the wsdl from. If Netbeans can find it, it will retrieve the wsdl file, and then put a Web Service References icon in your project. The problem isn't getting it the first time, the problem is that Netbeans wants to retrieve it every time you compile something. Fiddle with the jaxws-build.xml in nbprojects to stop the constant retrieval.
szczecia!
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, that will fit in a stocking