Wrox Programmer Forums
|
BOOK: Professional XML Development with Apache Tools
This is the forum to discuss the Wrox book Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice by Theodore W. Leung; ISBN: 9780764543555
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XML Development with Apache Tools section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2007, 08:53 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem accessing web service

Hi,
I've deployed a simple web service with Axis 1.4. I've followed these steps: Create WDSDL file > Use WSDL2Java > Use AdminClient to deploy de service.
But when I try to access the web service I get a Fault. The WSDL document follows:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://new.webservice.namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ms="http://gonysan.com" targetNamespace="http://new.webservice.namespace">
    <wsdl:import namespace="http://gonzalo.com" location="Calculador.xsd"/>
    <wsdl:types>
        <xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
    </wsdl:types>
    <wsdl:message name="sendMessageReq">
        <wsdl:part name="message1" type="ms:reqmessage"/>
    </wsdl:message>
    <wsdl:message name="sendMessageRes">
        <wsdl:part name="response" type="ms:response"/>
    </wsdl:message>
    <wsdl:portType name="Calculador">
        <wsdl:operation name="sendMessage">
            <wsdl:input message="tns:sendMessageReq"/>
            <wsdl:output message="tns:sendMessageRes"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="CalculadorBinding" type="tns:Calculador">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="sendMessage">
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="calculadorService">
        <wsdl:port name="Calculador" binding="tns:CalculadorBinding">
            <soap:address location="http://localhost:8080/axis/services/Calculador?wsdl"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

And the associated xsd file:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ms="http://gonysan.com" targetNamespace="http://gonysan.com">
    <xsd:element name="requestmessage" type="ms:reqmessage"/>
    <xsd:element name="response" type="ms:response"/>
    <xsd:complexType name="reqmessage">
        <xsd:sequence>
            <xsd:element name="subject" type="xsd:string"/>
            <xsd:element name="text" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="response">
        <xsd:sequence>
            <xsd:element name="id" type="xsd:string"/>
            <xsd:element name="name" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

Then I try to send the next SOAP Message:

POST /axis/services/Calculador HTTP/1.1
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml; charset=utf-8
Content-Length: 642
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_01
Host: 127.0.0.1
SAOPAcetion: ""
Connection: keep-alive

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns1:sendMessage xmlns:ns1="http://gonzalito.com">
         <ns2:Message xmlns:ns2="http://sandrita.com">
            <subject>tema1</subject>
            <text>text1</text>
         </ns2:Message>
         <ns3:Message xmlns:ns3="http://sandgon.com">
            <subject>subject2</subject>
            <text>text2</text>
         </ns3:Message>
      </ns1:sendMessage>
   </SOAP-ENV:Body></SOAP-ENV:Envelope>

And I get this SOAP Error Message:

HTTP/1.1 500 Error Interno del Servidor
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Sun, 22 Apr 2007 13:51:40 GMT
Connection: close

22d
<?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 xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
            <faultstring>no SOAPAction header!</faultstring>
            <detail>
               <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">E0016D43884DA</ns2:hostname>
            </detail>
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>

Thanks in advance.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on accessing Web Service vivekshah ASP.NET 1.0 and 1.1 Professional 0 June 17th, 2006 03:32 AM
Problem when downloading web service??? joan .NET Web Services 2 May 16th, 2004 06:39 AM
problem with deploying and accessing web Service clansullivan .NET Web Services 1 September 11th, 2003 09:43 AM
Urgent Web Service Problem DKillingsworth .NET Web Services 1 August 4th, 2003 12:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.