4 Replies Latest reply on Oct 15, 2007 8:33 AM by kumar reddy

    org.jboss.ws.WSException: Cannot obtain java type mapping fo

    kumar reddy Newbie

      Hi,

      I am migrating web services application from Weblogic 8.1.4 to JBoss 4.0.5.
      I have generated webservices.xml,jaxrpc-mapping.xml and WSDL by using wstools which is there in JbossWS 1.0.4.When i tried to deploy the web service it got deployed successfully.
      But i have requirement saying that i should use the WSDL that is generated from Weblogic when i replaced the Jboss WSDL with Weblogic WSDL and tried to deploy it is generating the following exception

      15:48:13,100 ERROR [MainDeployer] Could not create deployment: file:/D:/jboss-4.0.5.GA/server/default/deploy/macafeeAdapter.war
      org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://smo.xsd.covad.com/vendororder}ProcessVendorOrder
      at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataD
      oc(JSR109MetaDataBuilder.java:451)
      at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL
      (JSR109MetaDataBuilder.java:200)
      at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR
      109ServerMetaDataBuilder.java:223)
      at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpoin
      tDeployer.java:78)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInt
      erceptor.java:80)
      at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(Deployer
      InterceptorJSE.java:74)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
      create(SubDeployerInterceptorSupport.java:180)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
      ptor.java:91)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy39.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)


      Below are the files :

      contents of webservices.xml :

      <webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://smo.xsd.covad.com/vendororder' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
      <webservice-description>
      <webservice-description-name>VendorOrderService</webservice-description-name>
      <wsdl-file>WEB-INF/wsdl/VendorOrderService.wsdl</wsdl-file>
      <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
      <port-component>
      <port-component-name>VendorOrderPort</port-component-name>
      <wsdl-port>impl:VendorOrderPort</wsdl-port>
      <service-endpoint-interface>com.covad.mcafee.adapter.webservice.macafee</service-endpoint-interface>
      <service-impl-bean>
      <servlet-link>MacafeeAdapter</servlet-link>
      </service-impl-bean>
      </port-component>
      </webservice-description>



      contents of jaxrpc-mapping.xml:

      <?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
      <package-mapping>
      <package-type>com.covad.xsd.smo.vendororder</package-type>
      http://vendororder.smo.xsd.covad.com/jaws
      </package-mapping>
      <package-mapping>
      <package-type>com.covad.mcafee.adapter.webservice</package-type>
      http://smo.xsd.covad.com/vendororder
      </package-mapping>
      <java-xml-type-mapping>
      <java-type>com.covad.xsd.smo.vendororder.PhoneNumber</java-type>
      <root-type-qname xmlns:typeNS='http://vendororder.smo.xsd.covad.com/jaws'>typeNS:PhoneNumber</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>areaCode</java-variable-name>
      <xml-element-name>areaCode</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>extension</java-variable-name>
      <xml-element-name>extension</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>prefix</java-variable-name>
      <xml-element-name>prefix</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setAreaCode</java-variable-name>
      <xml-element-name>setAreaCode</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setExtension</java-variable-name>
      <xml-element-name>setExtension</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setPrefix</java-variable-name>
      <xml-element-name>setPrefix</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setSuffix</java-variable-name>
      <xml-element-name>setSuffix</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>suffix</java-variable-name>
      <xml-element-name>suffix</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.covad.xsd.smo.vendororder.Client</java-type>
      <root-type-qname xmlns:typeNS='http://vendororder.smo.xsd.covad.com/jaws'>typeNS:Client</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>city</java-variable-name>
      <xml-element-name>city</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>clientID</java-variable-name>
      <xml-element-name>clientID</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>companyName</java-variable-name>
      <xml-element-name>companyName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>countryCode</java-variable-name>
      <xml-element-name>countryCode</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>email</java-variable-name>
      <xml-element-name>email</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fax</java-variable-name>
      <xml-element-name>fax</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>firstName</java-variable-name>
      <xml-element-name>firstName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>lastName</java-variable-name>
      <xml-element-name>lastName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>password</java-variable-name>
      <xml-element-name>password</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>phone</java-variable-name>
      <xml-element-name>phone</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>salutation</java-variable-name>
      <xml-element-name>salutation</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setCity</java-variable-name>
      <xml-element-name>setCity</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setCompanyName</java-variable-name>
      <xml-element-name>setCompanyName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setCountryCode</java-variable-name>
      <xml-element-name>setCountryCode</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setEmail</java-variable-name>
      <xml-element-name>setEmail</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setFax</java-variable-name>
      <xml-element-name>setFax</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setFirstName</java-variable-name>
      <xml-element-name>setFirstName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setLastName</java-variable-name>
      <xml-element-name>setLastName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setPassword</java-variable-name>
      <xml-element-name>setPassword</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setPhone</java-variable-name>
      <xml-element-name>setPhone</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setSalutation</java-variable-name>
      <xml-element-name>setSalutation</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setState</java-variable-name>
      <xml-element-name>setState</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setStreetAddress1</java-variable-name>
      <xml-element-name>setStreetAddress1</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setStreetAddress2</java-variable-name>
      <xml-element-name>setStreetAddress2</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setUnit</java-variable-name>
      <xml-element-name>setUnit</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setZip</java-variable-name>
      <xml-element-name>setZip</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setZip4</java-variable-name>
      <xml-element-name>setZip4</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>state</java-variable-name>
      <xml-element-name>state</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>streetAddress1</java-variable-name>
      <xml-element-name>streetAddress1</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>streetAddress2</java-variable-name>
      <xml-element-name>streetAddress2</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>unit</java-variable-name>
      <xml-element-name>unit</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>zip</java-variable-name>
      <xml-element-name>zip</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>zip4</java-variable-name>
      <xml-element-name>zip4</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.covad.xsd.smo.vendororder.VendorOrder</java-type>
      <root-type-qname xmlns:typeNS='http://smo.xsd.covad.com/vendororder'>typeNS:VendorOrder</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>client</java-variable-name>
      <xml-element-name>client</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>contractAcceptedDate</java-variable-name>
      <xml-element-name>contractAcceptedDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>contractAcceptedFlag</java-variable-name>
      <xml-element-name>contractAcceptedFlag</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>orderID</java-variable-name>
      <xml-element-name>orderID</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>orderReceivedDate</java-variable-name>
      <xml-element-name>orderReceivedDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>productLanguageCode</java-variable-name>
      <xml-element-name>productLanguageCode</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setClient</java-variable-name>
      <xml-element-name>setClient</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setContractAcceptedDate</java-variable-name>
      <xml-element-name>setContractAcceptedDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setContractAcceptedFlag</java-variable-name>
      <xml-element-name>setContractAcceptedFlag</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>setVendorOrderID</java-variable-name>
      <xml-element-name>setVendorOrderID</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>vendorID</java-variable-name>
      <xml-element-name>vendorID</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>vendorOrderID</java-variable-name>
      <xml-element-name>vendorOrderID</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <service-interface-mapping>
      <service-interface>com.covad.mcafee.adapter.webservice.VendorOrderService</service-interface>
      <wsdl-service-name xmlns:serviceNS='http://smo.xsd.covad.com/vendororder'>serviceNS:VendorOrderService</wsdl-service-name>
      <port-mapping>
      <port-name>VendorOrderPort</port-name>
      <java-port-name>VendorOrderPort</java-port-name>
      </port-mapping>
      </service-interface-mapping>
      <service-endpoint-interface-mapping>
      <service-endpoint-interface>com.covad.mcafee.adapter.webservice.macafee</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS='http://smo.xsd.covad.com/vendororder'>portTypeNS:VendorOrder</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS='http://smo.xsd.covad.com/vendororder'>bindingNS:VendorOrderBinding</wsdl-binding>
      <service-endpoint-method-mapping>
      <java-method-name>processVendorOrder</java-method-name>
      <wsdl-operation>processVendorOrder</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>com.covad.xsd.smo.vendororder.VendorOrder</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS='http://smo.xsd.covad.com/vendororder'>wsdlMsgNS:VendorOrder_processVendorOrder</wsdl-message>
      <wsdl-message-part-name>VendorOrder_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
      <method-return-value>com.covad.xsd.smo.vendororder.VendorOrder</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS='http://smo.xsd.covad.com/vendororder'>wsdlMsgNS:VendorOrder_processVendorOrderResponse</wsdl-message>
      <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
      </service-endpoint-method-mapping>
      </service-endpoint-interface-mapping>
      </java-wsdl-mapping>

      contents of VendorOrderService.wsdl :

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <definitions
      name="VendorOrderService"
      targetNamespace="http://smo.xsd.covad.com/vendororder"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:tns="http://smo.xsd.covad.com/vendororder">

      <xsd:schema
      targetNamespace="http://smo.xsd.covad.com/vendororder"
      elementFormDefault="qualified">
      <xsd:element name="vendorOrderException" type="tns:VendorOrderException"/>
      <xsd:element name="processVendorOrder" type="tns:ProcessVendorOrder"/>
      <xsd:element name="processVendorOrderResponse" type="tns:ProcessVendorOrderResponse"/>
      <xsd:complexType name="ProcessVendorOrder">
      <xsd:sequence>
      <xsd:element name="vendorOrder" type="tns:VendorOrder"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ProcessVendorOrderResponse">
      <xsd:sequence>
      <xsd:element name="return" type="tns:VendorOrder" minOccurs="0"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="VendorOrderException">
      <xsd:sequence>
      <xsd:element name="errorCode" type="xsd:int"/>
      <xsd:element name="errorDescription" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="VendorOrder">
      <xsd:sequence>
      <xsd:element name="orderID" type="xsd:int"/>
      <xsd:element name="vendorID" type="xsd:int"/>
      <xsd:element name="vendorOrderID" type="xsd:string" minOccurs="0"/>
      <xsd:element name="orderReceivedDate" type="xsd:dateTime"/>
      <xsd:element name="contractAcceptedFlag" type="xsd:boolean" minOccurs="0"/>
      <xsd:element name="contractAcceptedDate" type="xsd:dateTime" minOccurs="0"/>
      <xsd:element name="productLanguageCode" type="xsd:string"/>
      <xsd:element name="client" type="tns:Client" minOccurs="0"/>
      <xsd:element name="lineItem" type="tns:LineItem" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="Client">
      <xsd:sequence>
      <xsd:element name="clientID" type="xsd:int"/>
      <xsd:element name="salutation" type="xsd:string" minOccurs="0"/>
      <xsd:element name="email" type="xsd:string" minOccurs="0"/>
      <xsd:element name="password" type="xsd:string" minOccurs="0"/>
      <xsd:element name="firstName" type="xsd:string" minOccurs="0"/>
      <xsd:element name="lastName" type="xsd:string" minOccurs="0"/>
      <xsd:element name="phone" type="tns:PhoneNumber" minOccurs="0"/>
      <xsd:element name="fax" type="tns:PhoneNumber" minOccurs="0"/>
      <xsd:element name="companyName" type="xsd:string" minOccurs="0"/>
      <xsd:element name="streetAddress1" type="xsd:string" minOccurs="0"/>
      <xsd:element name="streetAddress2" type="xsd:string" minOccurs="0"/>
      <xsd:element name="unit" type="xsd:string" minOccurs="0"/>
      <xsd:element name="city" type="xsd:string" minOccurs="0"/>
      <xsd:element name="state" type="tns:State" minOccurs="0"/>
      <xsd:element name="zip" type="tns:Zip" minOccurs="0"/>
      <xsd:element name="zip4" type="tns:Zip4" minOccurs="0"/>
      <xsd:element name="countryCode" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="PhoneNumber">
      <xsd:sequence>
      <xsd:element name="areaCode" type="tns:AreaCode" minOccurs="0"/>
      <xsd:element name="prefix" type="tns:Prefix" minOccurs="0"/>
      <xsd:element name="suffix" type="tns:Suffix" minOccurs="0"/>
      <xsd:element name="extension" type="tns:Extension" minOccurs="0"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="LineItem">
      <xsd:sequence>
      <xsd:element name="clientServiceID" type="xsd:int"/>
      <xsd:element name="productID" type="xsd:int"/>
      <xsd:element name="vendorProductID" type="xsd:string"/>
      <xsd:element name="quantity" type="xsd:int"/>
      <xsd:element name="lineItemNumber" type="xsd:int"/>
      <xsd:element name="lineItemAction" type="tns:LineItemAction"/>
      <xsd:element name="parameter" type="tns:Parameter" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="Parameter">
      <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      <xsd:element name="value" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:simpleType name="LineItemAction">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="INSTALL"/>
      <xsd:enumeration value="CHANGE"/>
      <xsd:enumeration value="DISCONNECT"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="AreaCode">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{3}"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Prefix">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{3}"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Suffix">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{4}"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Extension">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]*"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="State">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[A-Z]{2}"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Zip">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{5}"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Zip4">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="[0-9]{4}"/>
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:schema>


















      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

      <soap:operation/>

      <soap:body use="literal"/>


      <soap:body use="literal"/>


      <soap:fault name="VendorOrderException" use="literal"/>





      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>




      I am not getting where am i going wrong.

      Please help me.

      Thanks in Advance.

        • 1. Re: org.jboss.ws.WSException: Cannot obtain java type mappin
          Alessio Soldano Newbie

          Hi,
          I would suggest you to upgrade to jbossws 2.0.1 GA. This way you might switch from JAX-RPC to JAX-WS. Then I would use a top-down development strategy
          http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_User_Guide#Top-Down_.28Using_wsconsume.29
          that allows you to generate the java interfaces given your existing wsdl contract.
          Bye
          Alessio Soldano

          • 2. Re: org.jboss.ws.WSException: Cannot obtain java type mappin
            kumar reddy Newbie

            Hi,

            I have tried with jbossws 2.0.1 GA it is generating java interfaces when we give existing wsdl contract.

            But i have those interfaces generated by Weblogic so i have to use the classes generated by weblogic. This is my requirement.

            Any suggestions on the following error

            Cannot obtain java type mapping for

            I searched in google but i didnt get any information
            Please help me.

            Thanks in Advance.

            • 3. Re: org.jboss.ws.WSException: Cannot obtain java type mappin
              Alessio Soldano Master

               

              "tpawankumar" wrote:
              Cannot obtain java type mapping for

              This means that the wsdl contract, the xml artifacts and the java interfaces/classes somehow don't match. Generally speaking, you should double check namespaces, types, etc.

              "tpawankumar" wrote:
              I have tried with jbossws 2.0.1 GA it is generating java interfaces when we give existing wsdl contract.

              But i have those interfaces generated by Weblogic so i have to use the classes generated by weblogic. This is my requirement.

              I would use the right classes wsconsume created from your given wsdl contract (that is what you can't change, isn't it?).
              It's not so trivial mapping your interfaces and your wsdl contract manually fixing the xml descriptors created with wstools from jbossws 1.0.4.

              • 4. Re: org.jboss.ws.WSException: Cannot obtain java type mappin
                kumar reddy Newbie

                Hi,

                Thank you for your suggestion alessio.soldano.
                I have resolved this issue.yes,it is related to mapping of xml artifacts,java classes by using jbossws 1.0.4.

                I am also using the interfaces/classes generated by Weblogic.I must use these interfaces/classes which were generated by weblogic.I should not use classes generated by tools provided by jboss. This is my requirement.It deployed successfully.It published the WSDL file and i am able to view WSDL file.

                Now when i run the client initially i got the following exception

                jboss.ws.WSException: Cannot find java method: processVendorOrder
                at org.jboss.ws.metadata.OperationMetaData.getJavaMethod(OperationMetaData.java:213)
                at org.jboss.ws.binding.EndpointInvocation.getJavaMethod(EndpointInvocation.java:82)
                at org.jboss.ws.server.ServiceEndpointInvokerJSE.invokeServiceEndpoint(ServiceEndpointInvokerJSE.java:87)
                at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
                at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
                at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
                at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

                Then i modified jaxrpc-mapping.xml file such that it refers exact classes.
                This exception i got because weblogic uses XMLBeans to generate interfaces/classes the implementation classes for the interfaces were there in under impl directory so i have modified jaxrpc-mapping.xml to refer for the classes under impl directory.

                But now i am getting different exception

                Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Neither fromValue(java.lang.String p) nor fromValue(java.lang.String p1, javax.xml.namespace.NamespaceContext p2) were found in interface com.covad.xsd.smo.vendororder.AreaCode
                at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil.invokeUnmarshalMethod(RtUtil.java:350)
                at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtCharactersHandler.unmarshal(RtCharactersHandler.java:104)
                at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:872)
                at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:160)
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:295)
                at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
                at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
                at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:174)
                ... 34 more


                I think from the stack trace i understood that it is referring to interface and not to actual implementation class.AreaCode is a simple type.

                I want to know wheather jbossws supports XMLBeans or not?
                If supports ,which version of jbossws supports XMLBeans.

                Please help me.