- This topic has 7 replies, 3 voices, and was last updated 15 years, 5 months ago by srank.
-
AuthorPosts
-
srankMemberHello,
I know you’ve answered this type of question before but nothing I can find seems to fit my issue.
I am attempting to create a web services client against remote enabled SAP BAPIs. My BAPI coder has create a number of web enabled services. All of them but one build the client code. All of them, including the one that fails to build the client, pass validation.
The .log file shows this error:
!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2009-06-04 12:03:18.823
!MESSAGE Error generating services
!STACK 0
org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:154)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:245)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)The following WSDL fails:
+++++++++++++++++++++++++++++++++++++++++++++++++
<?xml version=”1.0″ encoding=”UTF-8″?><definitions xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:s0=”urn:sap-com:document:sap:rfc:functions” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:http=”http://schemas.xmlsoap.org/wsdl/http/” targetNamespace=”urn:sap-com:document:sap:rfc:functions”><types><xsd:schema targetNamespace=”urn:sap-com:document:sap:rfc:functions”><xsd:element name=”Z_PM_PTF1_PAGESOURCE”><xsd:complexType><xsd:all><xsd:element name=”PAGESOURCE”><xsd:complexType><xsd:sequence><xsd:element name=”item” minOccurs=”0″ maxOccurs=”unbounded” type=”s0:ZPMPAGESOURCE”></xsd:element></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:element name=”Z_PM_PTF1_PAGESOURCE.Response”><xsd:complexType><xsd:all><xsd:element name=”PAGESOURCE”><xsd:complexType><xsd:sequence><xsd:element name=”item” minOccurs=”0″ maxOccurs=”unbounded” type=”s0:ZPMPAGESOURCE”></xsd:element></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:complexType name=”ZPMPAGESOURCE”><xsd:sequence><xsd:element name=”MANDT” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”3″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZPAGEKEY” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”60″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZSOURCE” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”15″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZPAGE_VIEW” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”60″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZLAST_CHNGED_DT” minOccurs=”0″ type=”s0:date”></xsd:element><xsd:element name=”ZZLAST_CHNGED_BY” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”60″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:simpleType name=”date”><xsd:restriction base=”xsd:string”><xsd:maxLength value=”10″></xsd:maxLength><xsd:pattern value=”….-..-..”></xsd:pattern></xsd:restriction></xsd:simpleType></xsd:schema></types><message name=”Z_PM_PTF1_PAGESOURCEInput”><part name=”parameters” element=”s0:Z_PM_PTF1_PAGESOURCE”></part></message><message name=”Z_PM_PTF1_PAGESOURCEOutput”><part name=”parameters” element=”s0:Z_PM_PTF1_PAGESOURCE.Response”></part></message><portType name=”Z_PM_PTF1_PAGESOURCEPortType”><operation name=”Z_PM_PTF1_PAGESOURCE”><input message=”s0:Z_PM_PTF1_PAGESOURCEInput”></input><output message=”s0:Z_PM_PTF1_PAGESOURCEOutput”></output></operation></portType><binding name=”Z_PM_PTF1_PAGESOURCEBinding” type=”s0:Z_PM_PTF1_PAGESOURCEPortType”><soap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http”></soap:binding><operation name=”Z_PM_PTF1_PAGESOURCE”><soap:operation soapAction=”http://www.sap.com/Z_PM_PTF1_PAGESOURCE”></soap:operation><input><soap:body use=”literal”></soap:body></input><output><soap:body use=”literal”></soap:body></output></operation></binding><service name=”Z_PM_PTF1_PAGESOURCEService”><documentation>SAP Service Z_PM_PTF1_PAGESOURCE via SOAP</documentation><port name=”Z_PM_PTF1_PAGESOURCEPortType” binding=”s0:Z_PM_PTF1_PAGESOURCEBinding”><soap:address location=”http://sapdev.comp.wepco.com:8000/sap/bc/soap/rfc”></soap:address></port></service></definitions>
+++++++++++++++++++++++++++++++++++++++++++++++++While this one works:
+++++++++++++++++++++++++++++++++++++++++++++++++
<?xml version=”1.0″ encoding=”UTF-8″?><definitions xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:s0=”urn:sap-com:document:sap:rfc:functions” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:http=”http://schemas.xmlsoap.org/wsdl/http/” targetNamespace=”urn:sap-com:document:sap:rfc:functions”><types><xsd:schema targetNamespace=”urn:sap-com:document:sap:rfc:functions”><xsd:element name=”Z_PM_PTF1_FUNCLOC”><xsd:complexType><xsd:all><xsd:element name=”FUNCLOCS”><xsd:complexType><xsd:sequence><xsd:element name=”item” minOccurs=”0″ maxOccurs=”unbounded” type=”s0:ZPM_PTF1_FUNCLOC”></xsd:element></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:element name=”Z_PM_PTF1_FUNCLOC.Response”><xsd:complexType><xsd:all><xsd:element name=”FUNCLOCS”><xsd:complexType><xsd:sequence><xsd:element name=”item” minOccurs=”0″ maxOccurs=”unbounded” type=”s0:ZPM_PTF1_FUNCLOC”></xsd:element></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:complexType name=”ZPM_PTF1_FUNCLOC”><xsd:sequence><xsd:element name=”MANDT” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”3″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZPAGEKEY” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”60″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZFUNCLOC” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”60″></xsd:maxLength></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name=”ZZINDEX” minOccurs=”0″><xsd:simpleType><xsd:restriction base=”xsd:string”><xsd:maxLength value=”7″></xsd:maxLength><xsd:pattern value=”\d*”></xsd:pattern></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType></xsd:schema></types><message name=”Z_PM_PTF1_FUNCLOCInput”><part name=”parameters” element=”s0:Z_PM_PTF1_FUNCLOC”></part></message><message name=”Z_PM_PTF1_FUNCLOCOutput”><part name=”parameters” element=”s0:Z_PM_PTF1_FUNCLOC.Response”></part></message><portType name=”Z_PM_PTF1_FUNCLOCPortType”><operation name=”Z_PM_PTF1_FUNCLOC”><input message=”s0:Z_PM_PTF1_FUNCLOCInput”></input><output message=”s0:Z_PM_PTF1_FUNCLOCOutput”></output></operation></portType><binding name=”Z_PM_PTF1_FUNCLOCBinding” type=”s0:Z_PM_PTF1_FUNCLOCPortType”><soap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http”></soap:binding><operation name=”Z_PM_PTF1_FUNCLOC”><soap:operation soapAction=”http://www.sap.com/Z_PM_PTF1_FUNCLOC”></soap:operation><input><soap:body use=”literal”></soap:body></input><output><soap:body use=”literal”></soap:body></output></operation></binding><service name=”Z_PM_PTF1_FUNCLOCService”><documentation>SAP Service Z_PM_PTF1_FUNCLOC via SOAP</documentation><port name=”Z_PM_PTF1_FUNCLOCPortType” binding=”s0:Z_PM_PTF1_FUNCLOCBinding”><soap:address location=”http://sapdev.comp.wepco.com:8000/sap/bc/soap/rfc”></soap:address></port></service></definitions>
+++++++++++++++++++++++++++++++++++++++++++++++++And I can’t see any significant difference. Both were created the same way, same permissions in SAP, etc.
I tried to create clients in both MyEclipse 6 and 7. One under xfire and one under JAX (?). Both give a similar error. [I can’t give you the version 7 error as my installation of MyEclipse 7 was broken by our software distribution environment].
Any assistance or clues you can provide would be greatly appreciated.
Thank you,
Steve Rank
Loyal WaterMemberSteve,
Im afraid I cant provide you any assistance here. May be our forums users could help you here.I’ll pass this to our web services team as well and let you know incase they have any suggestions for you.
srankMemberThank you. Any assistance anyone can provide would be greatly appreciate.
Brian FernandesModeratorSteve,
I would note recommend using XFire because development (of the XFire framework) has ceased over a year ago. I did try to generate a client using the first WSDL file with JAX-WS and it worked. There does seem to be a problem with the “Enable asynchronous invocation for generated client” option and this WSDL, so do not check that option. If you still run into issues, can you please paste relevant errors from your error log here so we can try to figure out where things are failing?
srankMemberThank you for checking. When I tried this on my install of 7.1 it failed to build a client. After this failed for me, on the next launch of 7.1, the whole install FUBAR’ed on me. I am now waiting for installation support here to fix my install. For now I am back at 7.0 🙁
We know that xfire is depreciated. We are just now transitioning into 7.1 but big corporations sometime move very slowly. As soon as my 7.1 is rebuilt I will try it again. I believe that this will be a good test to see if the install of 7.1 is fixed or not.
Thanks much again for testing this. I now have confidence that it is an installation issue and not something with the WSDL and/or the tooling.
Steve
srankMemberBrian,
I have my installation of 7.0 repaired and the wsdl file now begins to parse. It stops with the error “a class/interface with the same name is already in use. use a class customization to resolve this conflict”. Before I take a lot of time researching this, did you have this same issue? If so, can you post your fix?
Thanks again,
Steve Rank
Brian FernandesModeratorSteve,
You tend to see this message when multiple elements in the WSDL’s schema are defined with the same name causing a conflict. However, I did not run into this issue when generating using your WSDL, did you change it?
If you really do have a conflict, can you give this thread a look and see if it helps? https://www.genuitec.com/forums/topic/myeclipse-6-5-blue-jax-ws-webservice-client-error/#post-286152&sid=b045d3a3040fb7e7c41fee4fa0eea635#93866
Let me know if you need further assistance.
srankMemberThis WSDL is from a “remote enabled RFC” on a SAP ECC system. The RFC is written in ABAP. I believe that the WSDL was not changed between being posted here and the my installation of 7.0. I did find a referenece on the internet that JAX-WS treats leading underscores as blanks. While the RFC does not have leading underscores it did use them as separators. I noticed that the wizard (for both xfire and JAX-WS) create classes without the underscore separator. Apparently the underscore is stripped out. Doing so caused the name of the function (Z_PM_PTF1_FUNCLOC) to match one of the elements (ZPM_PTF1_FUNCLOC). I did find that it is possible to control this “feature” using a bindings file but found no quick examples or tutorials on doing so. As we didn’t have time to gain the experience through trial and error, it was more expidicious to just rename the function and republish the RFC, that is what we did. All is now working for both xfire and JAX-WS.
-
AuthorPosts