1 Reply Latest reply on Nov 8, 2004 7:51 PM by lawrence lau

    A question about jbossws deploy

    lawrence lau Newbie

      when I deploy a webservice application of Sun java blueprint ,Adventure to jboss server4.0.0.I modified some config file about webservice when i checkout the order,I received a error message like:
      #################################
      08:23:43,129 ERROR [Service] Error processing WSDL document:
      javax.xml.rpc.ServiceException: Cannot find service: OpcPurchaseOrderService
      javax.xml.rpc.ServiceException: Error processing WSDL document:
      javax.xml.rpc.ServiceException: Cannot find service: OpcPurchaseOrderService
      at org.apache.axis.client.Service.initService(Service.java:358)
      at org.apache.axis.client.Service.initService(Service.java:288)
      at org.apache.axis.client.Service.(Service.java:195)
      at org.jboss.webservice.client.ServiceImpl.(ServiceImpl.java:99)
      at org.jboss.webservice.client.ServiceObjectFactory.getObjectInstance(Se
      rviceObjectFactory.java:155)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
      01)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:621)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:643)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.sun.j2ee.blueprints.consumerwebsite.actions.CheckoutHTMLAction.bu
      ildPurchaseOrder(Unknown Source)
      at com.sun.j2ee.blueprints.consumerwebsite.actions.CheckoutHTMLAction.pe
      rform(Unknown Source)
      at com.sun.j2ee.blueprints.waf.controller.web.html.HTMLActionSupport.per
      form(Unknown Source)
      at com.sun.j2ee.blueprints.waf.controller.web.RequestProcessor.processRe
      quest(Unknown Source)
      at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doProcess(Unkn
      own Source)
      at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doPost(Unknown
      Source)

      web.xml is like:
      #####################
      <service-ref>
      OPC PO Service Client
      <service-ref-name>service/OpcPurchaseOrderService</service-ref-name>
      <service-interface>com.sun.j2ee.blueprints.consumerwebsite.actions.OpcPurchaseOrderService</service-interface>
      <wsdl-file>WEB-INF/wsdl/OpcPurchaseOrderService.wsdl</wsdl-file>
      <jaxrpc-mapping-file>WEB-INF/opc-po-jaxrpc-mapping.xml</jaxrpc-mapping-file>
      <service-qname xmlns:servicens="urn:OpcPurchaseOrderService">servicens:OpcPurchaseOrderService</service-qname>
      </service-ref>

      <service-ref>
      OPC OT Service Client
      <service-ref-name>service/OpcOrderTrackingService</service-ref-name>
      <service-interface>com.sun.j2ee.blueprints.consumerwebsite.actions.OpcOrderTrackingService</service-interface>
      <wsdl-file>WEB-INF/wsdl/OpcOrderTrackingService.wsdl</wsdl-file>
      <jaxrpc-mapping-file>WEB-INF/opc-ot-jaxrpc-mapping.xml</jaxrpc-mapping-file>

      <service-qname xmlns:servicens="urn:OpcOrderTrackingService">servicens:OpcOrderTrackingService</service-qname>
      </service-ref>

      mapping.xml is like:
      ###################
      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:impl="urn:OpcPurchaseOrderService"
      version="1.1" 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.sun.j2ee.blueprints.consumerwebsite.actions</package-type>
      urn:OpcPurchaseOrderService
      </package-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.Address</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:Address</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>country</java-variable-name>
      <xml-element-name>country</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>postalCode</java-variable-name>
      <xml-element-name>postalCode</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>streetName1</java-variable-name>
      <xml-element-name>streetName1</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>streetName2</java-variable-name>
      <xml-element-name>streetName2</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.PurchaseOrderIntf_submitPurchaseOrder_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:submitPurchaseOrderResponse</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>result</java-variable-name>
      <xml-element-name>result</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.PurchaseOrder</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:PurchaseOrder</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>activities</java-variable-name>
      <xml-element-name>activities</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>billingInfo</java-variable-name>
      <xml-element-name>billingInfo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>creditCard</java-variable-name>
      <xml-element-name>creditCard</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>departureCity</java-variable-name>
      <xml-element-name>departureCity</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>departureFlightInfo</java-variable-name>
      <xml-element-name>departureFlightInfo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>emailId</java-variable-name>
      <xml-element-name>emailId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>endDate</java-variable-name>
      <xml-element-name>endDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>headCount</java-variable-name>
      <xml-element-name>headCount</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>locale</java-variable-name>
      <xml-element-name>locale</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>lodging</java-variable-name>
      <xml-element-name>lodging</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>orderDate</java-variable-name>
      <xml-element-name>orderDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>poId</java-variable-name>
      <xml-element-name>poId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>returnFlightInfo</java-variable-name>
      <xml-element-name>returnFlightInfo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>shippingInfo</java-variable-name>
      <xml-element-name>shippingInfo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>startDate</java-variable-name>
      <xml-element-name>startDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>totalPrice</java-variable-name>
      <xml-element-name>totalPrice</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>userId</java-variable-name>
      <xml-element-name>userId</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.Lodging</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:Lodging</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>endDate</java-variable-name>
      <xml-element-name>endDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>location</java-variable-name>
      <xml-element-name>location</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>lodgingId</java-variable-name>
      <xml-element-name>lodgingId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>noNights</java-variable-name>
      <xml-element-name>noNights</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>noRooms</java-variable-name>
      <xml-element-name>noRooms</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>pricePerNight</java-variable-name>
      <xml-element-name>pricePerNight</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>startDate</java-variable-name>
      <xml-element-name>startDate</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.CreditCard</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:CreditCard</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>cardExpiryDate</java-variable-name>
      <xml-element-name>cardExpiryDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>cardNumber</java-variable-name>
      <xml-element-name>cardNumber</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>cardType</java-variable-name>
      <xml-element-name>cardType</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.ContactInfo</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:ContactInfo</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>address</java-variable-name>
      <xml-element-name>address</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>familyName</java-variable-name>
      <xml-element-name>familyName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>givenName</java-variable-name>
      <xml-element-name>givenName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>phone</java-variable-name>
      <xml-element-name>phone</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.ProcessingException</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:ProcessingException</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>message</java-variable-name>
      <xml-element-name>message</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.Transportation</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:Transportation</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>carrier</java-variable-name>
      <xml-element-name>carrier</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>departureDate</java-variable-name>
      <xml-element-name>departureDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>departureTime</java-variable-name>
      <xml-element-name>departureTime</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>destination</java-variable-name>
      <xml-element-name>destination</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>headCount</java-variable-name>
      <xml-element-name>headCount</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>origin</java-variable-name>
      <xml-element-name>origin</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>price</java-variable-name>
      <xml-element-name>price</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>transportationId</java-variable-name>
      <xml-element-name>transportationId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>travelClass</java-variable-name>
      <xml-element-name>travelClass</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.InvalidPOException</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:InvalidPOException</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>message</java-variable-name>
      <xml-element-name>message</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.Activity</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:Activity</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>activityId</java-variable-name>
      <xml-element-name>activityId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>endDate</java-variable-name>
      <xml-element-name>endDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>headCount</java-variable-name>
      <xml-element-name>headCount</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>location</java-variable-name>
      <xml-element-name>location</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>price</java-variable-name>
      <xml-element-name>price</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>startDate</java-variable-name>
      <xml-element-name>startDate</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.PurchaseOrderIntf_submitPurchaseOrder_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="urn:OpcPurchaseOrderService">typeNS:submitPurchaseOrder</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>purchaseOrder_1</java-variable-name>
      <xml-element-name>PurchaseOrder_1</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.sun.j2ee.blueprints.consumerwebsite.actions.Activity[]</java-type>
      <anonymous-type-qname>urn:OpcPurchaseOrderService:PurchaseOrder&gt;activities[0,unbounded]</anonymous-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      <exception-mapping>
      <exception-type>com.sun.j2ee.blueprints.consumerwebsite.actions.ProcessingException</exception-type>
      <wsdl-message xmlns:exMsgNS="urn:OpcPurchaseOrderService">exMsgNS:ProcessingException</wsdl-message>
      <constructor-parameter-order>
      <element-name>message</element-name>
      </constructor-parameter-order>
      </exception-mapping>
      <exception-mapping>
      <exception-type>com.sun.j2ee.blueprints.consumerwebsite.actions.InvalidPOException</exception-type>
      <wsdl-message xmlns:exMsgNS="urn:OpcPurchaseOrderService">exMsgNS:InvalidPOException</wsdl-message>
      <constructor-parameter-order>
      <element-name>message</element-name>
      </constructor-parameter-order>
      </exception-mapping>
      <service-interface-mapping>
      <service-interface>com.sun.j2ee.blueprints.consumerwebsite.actions.OpcPurchaseOrderService</service-interface>
      <wsdl-service-name xmlns:serviceNS="urn:OpcPurchaseOrderService">serviceNS:OpcPurchaseOrderService</wsdl-service-name>
      <port-mapping>
      <port-name>PurchaseOrderIntfPort</port-name>
      <java-port-name>PurchaseOrderIntfPort</java-port-name>
      </port-mapping>
      </service-interface-mapping>
      <service-endpoint-interface-mapping>
      <service-endpoint-interface>com.sun.j2ee.blueprints.consumerwebsite.actions.PurchaseOrderIntf</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS="urn:OpcPurchaseOrderService">portTypeNS:PurchaseOrderIntf</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="urn:OpcPurchaseOrderService">bindingNS:PurchaseOrderIntfBinding</wsdl-binding>
      <service-endpoint-method-mapping>
      <java-method-name>submitPurchaseOrder</java-method-name>
      <wsdl-operation>submitPurchaseOrder</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>com.sun.j2ee.blueprints.consumerwebsite.actions.PurchaseOrder</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="urn:OpcPurchaseOrderService">wsdlMsgNS:PurchaseOrderIntf_submitPurchaseOrder</wsdl-message>
      <wsdl-message-part-name>PurchaseOrder_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
      <method-return-value>java.lang.String</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="urn:OpcPurchaseOrderService">wsdlMsgNS:PurchaseOrderIntf_submitPurchaseOrderResponse</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>

      *.wsdl file is like :
      <?xml version="1.0" encoding="UTF-8"?>

      <definitions name="OpcPurchaseOrderService" targetNamespace="urn:OpcPurchaseOrderService"
      xmlns:impl="urn:OpcPurchaseOrderService" xmlns:intf="urn:OpcPurchaseOrderService"
      xmlns:tns="urn:OpcPurchaseOrderService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

      <schema targetNamespace="urn:OpcPurchaseOrderService" xmlns:tns="urn:OpcPurchaseOrderService" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">




























































































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

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="urn:OpcPurchaseOrderService"/>

      <soap:body use="literal" namespace="urn:OpcPurchaseOrderService"/>

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

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


      <soap:address location="http://localhost:8080/opc-ejb/webservice/PoEndpointBean"/>

      I invoke a webservice on web client,who can see some problems.Thanks

        • 1. Re: A question about jbossws deploy
          lawrence lau Newbie

          when I deploy this application to jboss,some message is like:
          08:47:39,545 INFO [EARDeployer] Init J2EE application: file:/D:/jboss-4.0.0/ser
          ver/default/deploy/consumerwebsite.ear
          08:47:41,537 WARN [QNameBuilder] Cannot find namespaceURI for name: servicens:O
          pcPurchaseOrderService
          08:47:41,537 WARN [QNameBuilder] Cannot find namespaceURI for name: servicens:O
          pcOrderTrackingService
          this application,all *.wsdl file all build by sun tools--wscompile not axis java2wsdl.I cannot sure jboss server is compatible.Thanks