Skip to Content
avatar image
Former Member

error creating a web service client from th WSDL document (soamanager)

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 23, 2009 at 04:05 PM

    Hi,

    Are you using Document style WSDL?

    Regards,

    Vikas

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Apr 15, 2011 at 08:02 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I had the same issue as the OP when trying to import a WSDL generated through SOAMANAGER into ESR.  Martin's solution worked for me.  I'm sure the other suggestions here work as well, but I find his to be more appropriate as it does not require you to manually edit the WSDL document.

  • Aug 30, 2010 at 01:05 PM

    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

    Add comment
    10|10000 characters needed characters exceeded