Bruno,
I got the issue here.

The problem is in one of the following lines where you construct your input 
SOAP xml,

  "<ns1:findSites " +
                   
"soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\";; " +
                    "xmlns:ns1=\"eRanger-campground-vending\"> +" +

There is a plus sign inside the quotes in the last line. Remove that, and test 
it.
Even your old code also may work!!..

Guess that was very silly... :-)

Thanks,
Anoop


----- Original Message ----
From: Anoop Elias <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, April 12, 2008 11:38:44 PM
Subject: Re: simple HTTP POST soap xml 'No such operation'

 
Bruno,
Do you know if there is some change in this service very recently?
Even the code that was working properly is not working now, with a different 
fault,

         <soapenv:Fault>
            <faultcode>soapenv:Server.userException</faultcode>
            <faultstring>javax.xml.soap.SOAPException</faultstring>
            <detail>
                oslo'>http://xml.apache.org/axis/";>oslo
            </detail>
         </soapenv:Fault>

Has it become secured now? I am not able to test this anymore.
Anyways, good luck to you.

Thanks,
Anoop

----- Original Message ----
From: Bruno <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, April 12, 2008 8:13:29 PM
Subject: Re: simple HTTP POST soap xml 'No such operation'

         thanks Anoop - you're quite good at this! Yes that's a beautiful 
result, now if I can only follow in your footsteps :> Bruno
 
 Anoop Elias wrote:    Please find the response I got....

I guess you have to read it from xml file rather than applying from a String 
variable. It could be looking for an EOF or something.
Will check if we can use String variable itself. Will keep you posted.

Thanks,
Anoop

<?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>
        <ns1:findSitesResponse
           
 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
            xmlns:ns1="eRanger-campground-vending">
        <findSitesReturn xsi:type="xsd:string">
    [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
    
    </findSitesReturn>
        </ns1:findSitesResponse>
   
 </soapenv:Body>
</soapenv:Envelope>

----- Original Message ----
From: Bruno <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, April 12, 2008 7:13:58 PM
Subject: Re: simple HTTP POST soap xml 'No such operation'

  Elias,

Thanks for the input, but running your code I get:

    "Server returned HTTP response code: 500 for 
URL:http://eranger.us/axis/services";;

Did you get a good response that looks something like:

 [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

Looks like you're on a Windows platform, so maybe it works there butnot where 
I'm at ?

bfn, Bruno


Anoop Elias wrote:  This is what I had tried, and it
 worked for me!..


    public static void main(String[] args) throws Exception {
        URL url = new URL("http://eranger.us/axis/services";;);

        URLConnection conn = url.openConnection();
        conn.addRequestProperty("SOAPAction",
                "eRanger-campground_vending/findSites");
        conn.setDoOutput(true);

        PrintWriter writer = new PrintWriter(new OutputStreamWriter(conn
                .getOutputStream()));

        InputStream contents = new 
FileInputStream("C:/Technical/WebServices/SOAPRequest.xml");
        BufferedReader buff = new BufferedReader(
                new InputStreamReader(contents));

        String line;
        while ((line = buff.readLine()) != null) {
            writer.write(line);
        }

        writer.flush();
       
 InputStream input = null;
        try {
            input = conn.getInputStream();
        } catch (Exception e) {
            e.printStackTrace();
        }

        BufferedReader bufferedReader = new BufferedReader(
                new InputStreamReader(input));
        StringBuffer buffer = new StringBuffer();

        String s;
        while ((s = bufferedReader.readLine()) != null) {
            buffer.append(s);
        }
        System.out.println(buffer.toString());
    }


Thanks,
Anoop

----- Original Message ----
From: Bruno <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, April 12, 2008 11:51:14 AM
Subject: simple HTTP POST soap xml 'No such operation'

It must be so simple to POST a SOAP envelope but I've hit a brick wall and hope 
you know the "magic" solution.

Things work fine when calling the web service using Axis - but now I'm in an 
environment where there is no Axis.

So I grabbed the SOAP XML from tcpmon and am sending the SOAP envelope with a 
simple HTTP POST. It seems to me that the only arguments
I've got to work "magic" with are :
       
            String url = "http://eranger.us/axis/services";;;
            String soapAction = "eRanger-campground_vending/findSites";

In the axis version, I used 'call.setOperationName( new 
QName("eRanger-campground_vending", "findSites" )' -
 perhaps that QName thingy (???) is now missing? All I'm doing now is:
          
           HttpClient client = new HttpClient();
           PostMethod postMethod = new PostMethod(  url  );
          
               StringBuffer request = new StringBuffer();
               request.append( soapRequestXML );
               postMethod.setRequestBody(request.toString());
               postMethod.setRequestHeader("Content-Type", "text/xml; 
charset=utf-8");
          
           postMethod.setRequestHeader("SOAPAction",  soapAction  );
           client.executeMethod(postMethod);  
          
But alas, I just can not get past the "No such operation 'findSites'" error 
response (see below) no matter what url/soapAction I try:

What do I need to set for 'url/soapAction' - or am I missing something 
altogether? .

thank you for any help - got a deadline to meet in about 60 hours (Google's 
Android Challenge - SOS
 :< )
[EMAIL PROTECTED]

--------------------------------------------------------

Here's the soapRequestXML:

    String soapRequestXML =
        "<?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>" +
              
  "<ns1:findSites " +
                   
"soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\";; " +
                    "xmlns:ns1=\"eRanger-campground-vending\"> +" +
                    "<ns1:arg0 href=\"#id0\"/>" +
                    "<ns1:arg1 href=\"#id1\"/>" +
                "</ns1:findSites>" +
                "<multiRef id=\"id0\" soapenc:root=\"0\"
soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\";;
xsi:type=\"soapenc:int\"
xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\";>"; +
           
         "18" +
                "</multiRef>" +
                "<multiRef id=\"id1\" soapenc:root=\"0\"
soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\";;
xsi:type=\"soapenc:int\"
xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\";>"; +
                    "3" +
                "</multiRef>" +
            "</soapenv:Body>" +
        "</soapenv:Envelope>";


Here's the error response:


    <?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>Server.userException</faultcode>
                <faultstring>No such operation 'findSites'</faultstring>
                <detail>
                    <ns1:hostname xmlns:ns1="http://xml.apache..org/axis/";;>
                        oslo
                   
 </ns1:hostname>
                </detail>
            </soapenv:Fault>
        </soapenv:Body>
    </soapenv:Envelope>


Here's the WSDL:

-
    <wsdl:definitions
targetNamespace="http://www.eranger.us/axis/services/eRanger-campground-vending";;>
-
    <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
-
    <wsdl:message name="cancelSiteRequest">
<wsdl:part name="site" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="bookSiteResponse">
<wsdl:part name="bookSiteReturn" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="findSitesResponse">
<wsdl:part name="findSitesReturn"
 type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="bookSiteRequest">
<wsdl:part name="preferredSites" type="xsd:string"/>
<wsdl:part name="reservationNumber" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="cancelSiteResponse">
<wsdl:part name="cancelSiteReturn" type="xsd:boolean"/>
</wsdl:message>
-
    <wsdl:message name="findSitesRequest">
<wsdl:part name="lengthRv" type="xsd:int"/>
<wsdl:part name="noTents" type="xsd:int"/>
</wsdl:message>
-
    <wsdl:message name="checkinReservationResponse">
<wsdl:part name="checkinReservationReturn" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="checkinReservationRequest">
<wsdl:part name="reservationNumber" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:portType
 name="Vending">
-
    <wsdl:operation name="checkinReservation"
parameterOrder="reservationNumber">
<wsdl:input message="impl:checkinReservationRequest"
name="checkinReservationRequest"/>
<wsdl:output message="impl:checkinReservationResponse"
name="checkinReservationResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="findSites" parameterOrder="lengthRv noTents">
<wsdl:input message="impl:findSitesRequest" name="findSitesRequest"/>
<wsdl:output message="impl:findSitesResponse" name="findSitesResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="bookSite" parameterOrder="preferredSites
reservationNumber">
<wsdl:input message="impl:bookSiteRequest" name="bookSiteRequest"/>
<wsdl:output message="impl:bookSiteResponse" name="bookSiteResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="cancelSite"
 parameterOrder="site">
<wsdl:input message="impl:cancelSiteRequest" name="cancelSiteRequest"/>
<wsdl:output message="impl:cancelSiteResponse" name="cancelSiteResponse"/>
</wsdl:operation>
</wsdl:portType>
-
    <wsdl:binding name="eRanger-campground-vendingSoapBinding"
type="impl:Vending">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
-
    <wsdl:operation name="checkinReservation">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="checkinReservationRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://services.eRanger.us";; use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="checkinReservationResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://www.eranger.us/axis/services/eRanger-campground-vending";;
use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="findSites">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="findSitesRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://services.eRanger.us";; use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="findSitesResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://www.eranger.us/axis/services/eRanger-campground-vending";;
use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="bookSite">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input
 name="bookSiteRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://services.eRanger.us";; use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="bookSiteResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://www.eranger.us/axis/services/eRanger-campground-vending";;
use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
   
 <wsdl:operation name="cancelSite">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="cancelSiteRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://services.eRanger.us";; use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="cancelSiteResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";;
namespace="http://www.eranger.us/axis/services/eRanger-campground-vending";;
use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
-
    <wsdl:service name="VendingService">
-
    <wsdl:port binding="impl:eRanger-campground-vendingSoapBinding"
name="eRanger-campground-vending">
<wsdlsoap:address
location="http://www.eranger.us/axis/services/eRanger-campground-vending"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

<!-- the end -->


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  ---------------------------------------------------------------------To 
unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, e-mail: [EMAIL 
PROTECTED]




__________________________________________________
Do You Yahoo!?
Tired of spam? 
 Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
    --------------------------------------------------------------------- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED]  




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to