on 09-23-2009 2:38 PM
Hello everyone,
we have generate with the wizard a web-service using the function module BAPI_CONTROL_RECIPE_GET_LIST. Then we have generated with SOAMANAGER the end point. As test, we have used a web-service explorer of Eclispe and we can retrieve without problems the data.
Then we wanted to generate the web-servcie client with Eclipse Galileo (3.5.0) wiith the server GlassFish v2.1 Java EE 5 we first installed the WSIT jars, in order to support WS-RM protocol
We have started the generation based on the document obtainend within the soamanager under the "Open WSDL document for selected binding" link.
We have tried it several times and we always got the following error is:
IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy):
faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.: <br>
WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)
Do you know if we took the right document in order to generate the web-service client? Do we need to have some specifics settings in the configurations of th endpoint? (provider security, transport settings, etc...?)
If needed, or if someone would be nice enough to try to generate it on its side, I can post here the whole wsdl document, but due to its length, I first wait your comments.
Thanks a lot in advance for your feed-back
best regards
Pierre-André
-
-
addtions:
maybe this should have been better posted within the forum Service-Oriented Architecture than standards?
I forgot to mention the following threads, which seems to me to be somehow in this direction. But I do not get really how I could use them, or how is is releated.
Edited by: Pierre-andre Jacquod on Sep 23, 2009 4:02 PM
Hi,
Are you using Document style WSDL?
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pierre-André,
Just curious, but did you manage to resolve your problem? I am also having difficulty creating SOAP clients from the generated WSDLs using e.g. SoapUI or soap4r, although WSDLs from older releases (e.g. 6.40) are no problem.
I have tried both RPC-style and document-style, but neither works.
Many thanks,
Martin
Hello Pierre-Andre,
My problem is probably not related to yours, but I just solved my problem. I was using the WSDL from SICF which gives only the port type definition. I found the proper WSDL using SOAMANAGER, except that the URL in there always points to port 443, but it seems note 1263112 resolves this.
Thanks,
Martin
hello,
yes we could solve the issue.Here below the answer with some background information
Background:
The problem arise since ABA 700 SP 14 (SAPKA70014). Reason: since there, there is a ws_policy that is used in wsdl document. This is a very recent specification and not widely supported.
Solution:
Use a client generation tool that support the ws_policy and ws_rm protocol.... Easy to say:-) after several trials, we were able to generate the client side code with Axis2 1.4.5 and Apache Sandesha2 add-on Supporting WS-Reliable Messaging. (this is java and we used Eclipse)
best regards
Pierre-André
Pierre-Andre,
I've faced the same issue generating client code. Could you please get into some more details about Java and Eclipse? As I understood you use Eclipse Galileo 3.5. But I canu2019t find version 1.4.5 of Axis2 (there are 1.4.1/ 1.5 for Axis2 and 1.4 for Eclipse code generator plugin which I have been trying without success). Maybe you can point me to some web resource?
Thank you.
Dmitry.
Hi,
I am facing the same issue while generating the client java class from IBM RAD 6.0.
Here is the error I am getting.
WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
[java] at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
[java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
[java] at java.lang.Thread.run(Thread.java:571)
Please guide me to resolve this issue.
Thanks & Regards,
Vijay
Hi everyone,
within SOAMANGER > web service administration you can change the WSDL format from 'WS Policy' to 'standard'. This solved our problem with Eclipse wsdl validator, which uses the Web Services Interoperability (www.ws-i.org) extensions.
Best regards,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe it's "Overview" tab
and beneath these
Open porttype WSDL document
Open WSDL document for selected binding
Open Web Service navigator for selected binding
Display selected Binding's WSDL URL
there's a button called: "Show/Hide WSDL Options'
BTW, It was said, in old version, there's no such a button.
Hi,
try replacing "ws-policy" by "standard" in the WSDL URL before copying&pasting it into the respective input field in the Developer Studio (you could also try that URL modification in the web browser first to verify that it's correct). This should give you a WSDL without WS-Policy extensions and should avoid these problems when using the default configuration with Axis (I didn't try Axis2) - at least it did for me
Best regards
Heiko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there...
inside the WSDL you just need to exchange
<wsp:UsingPolicy wsdl:required="true"/>
by
<wsp:UsingPolicy wsdl:required="false"/>
Save the WSDL, incorporate it in the calling platform and let go.
Works fine for me using PHP / SAP R/3.
I found this workaround here: [http://bugs.php.net/bug.php?id=46130&edit=1|http://bugs.php.net/bug.php?id=46130&edit=1]
kr, zara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.