axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: problem invoking webservice
Date Fri, 21 Apr 2006 18:51:02 GMT
Your schema specified elementFormDefault="qualified".

<resourcetypename>1</resourcetypename>

should be

<m:resourcetypename>1</m:resourcetypename>

Anne

On 4/21/06, Assaf . <asaf.lahav@primagrid.com> wrote:
>
> Hi,
>
> I have a problem while invoking a test muse service I wrote.
> (Find attached the WSDL file of the service).
> As you can see in the WSDL file, the service exposes an operation 'create'
> which has one input argument of type string.
> As I am writing a client which is supposed to invoke the service, I am
> generating a SOAP request and sending it to the server.
> I looked through the following article that instructs how to build a SOAP
> message for literal wrapped services:
>
> http://www-128.ibm.com/developerworks/webservices/library/ws-tip-namespace.html
> AFAIK the SOAP message I'm sending to the service is supposed to be
> correct.
> Following is the SOAP message I'm sending to the service and the log from
> the tomcat in DEBUG logging level.
>
> SOAP:
> Sending request:
>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="
> http://www.primagrid.com/test/one/testservice" xmlns:add="
> http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>   <Header>
>     <add:To>http://localhost:8080/muse/services/ServicesAdmin</add:To>
>     <add:Action>
> http://www.primagrid.com/test/one/testservice/ServicesAdminPortType/Create
> </add:Action>
>     <m:ResourceIdentifier>1</m:ResourceIdentifier>
>   </Header>
>   <Body>
>     <m:create>
>       <resourcetypename>1</resourcetypename>
>     </m:create>
>   </Body>
> </Envelope>
>
> LOG:
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ResourceHandler: Received
> request.
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ResourceHandler: Received SOAP
> request:
> <?xml version="1.0" encoding="UTF-8"?><!-- edited with XMLSpy v2006 sp2 U
> (http://www.altova.com) by vahal (AnonymousComp) --><Envelope xmlns="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="
> http://www.primagrid.com/test/one/testservice" xmlns:add="
> http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>             <Header>
>                         <add:To>
> http://localhost:8080/muse/services/ServicesAdmin</add:To>
>                         <add:Action>
> http://www.primagrid.com/test/one/testservice/ServicesAdminPortType/Create
> </add:Action>
>                         <m:ResourceIdentifier>1</m:ResourceIdentifier>
>             </Header>
>             <Body>
>                         <m:create>
>                                     <resourcetypename type="xsd:string"/>
>                         </m:create>
>             </Body>
> </Envelope>
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(GET_ACTION_FRO
> --> M_ADDR_HDR)
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] AbstractResourceContext:
> --> Retrieving the Action from the Addressing Headers.  Action is:
> --> http://www.primagrid.com/test/one/testservice/ServicesAdminPortType/
> --> Create
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(JNDI_HOME_LOCA
> --> TION)
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] AbstractResourceContext: The
> --> JNDI home location is: wsrf/services/ServicesAdmin/home
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(RETRIEVED_SERV
> --> ICE_CLASSNAME)
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ResourceHandler: Retrieved
> service classname: com.primagrid.test.one.testservice.ServicesAdminServicefrom resource
home.
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(CREATING_INSTA
> --> NCE_OF_SERVICE)
> --> 04-20-06 18:35:46 DEBUG [http-8080-2] ResourceHandler: Creating an
> --> instance of service class: class
> --> com.primagrid.test.one.testservice.ServicesAdminService
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.util.i18n.resource::handleGetObject(CONVRT_QNAME_TO_NA
> --> ME)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] NameUtils: Converting QName to
> --> Name.  QName:
> --> {http://www.primagrid.com/test/one/testservice}ResourceIdentifier
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.util.i18n.resource::handleGetObject(CREATING_NAME)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] NameUtils: Creating a Name
> --> from localpart: ResourceIdentifier prefix:  uri:
> --> http://www.primagrid.com/test/one/testservice
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(FINDING_RESOUR
> --> CE_WITH_KEY)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] AbstractResourceHome: Finding
> resource with key 1 ...
> -> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> -> org.apache.ws.resource.i18n.resource::handleGetObject(GETTING_RESOURC
> -> E_WITH_ID)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] AbstractResourceHome: Attempting
> to lookup resource with identifier 1 from
> com.primagrid.test.one.testservice.ServicesAdminHome ...
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(DERIVE_SERVICE
> --> _NAME_FROM_REQ)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ResourceHandler: Deriving the
> service method name from the request body element name (create@
> http://www.primagrid.com/test/one/testservice)...
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ResourceHandler: Based on the
> --> request, looking for method named: create in service
> --> com.primagrid.test.one.testservice.ServicesAdminService with a
> --> single param of type: org.apache.xmlbeans.impl.values.XmlAnyTypeImpl
> --> 04-20-06 18:35:48  WARN [http-8080-2] ResourceHandler: Found method
> --> named: create in service
> --> com.primagrid.test.one.testservice.ServicesAdminService with a
> --> single param of type:
> --> com.primagrid.test.one.testservice.CreateDocument , however the
> --> request param was of type:
> --> org.apache.xmlbeans.impl.values.XmlAnyTypeImpl
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ProjectResourceBundle:
> --> org.apache.ws.resource.i18n.resource::handleGetObject(BAD_REQUEST_BO
> --> DY_ELEMENT)
> --> 04-20-06 18:35:48 DEBUG [http-8080-2] ResourceProvider: Sending SOAP
> fault:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
>   <soapenv:Fault>
>    <faultcode>soapenv:Client</faultcode>
>    <faultstring>Unrecognized request body element: create@
> http://www.primagrid.com/test/one/testservice</faultstring>
>    <detail/>
>   </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> The FAULT message I get in the TOMCAT log indicates the 'create' operation
> is found by the argument it has is not of the correct data type.
> What would be the right way to construct the SOAP message?
>
> Thanks in advance,
>
> Asaf Lahav
> VP R&D, Prima Grid LTD.
> Cellular:  972-54-4717955
> Phone:   972-3-6540255
> Fax:       972-3-6540254
>
>
>

Mime
View raw message