Hi guys, the SOAP message generated by the code bellow is rendering
some wierd characters before and after the XML content.

Bellow is the SOAP message caught using tcpmon. Note the "102" and the
"0" before and after the XML.

POST /pfappspabxutils HTTP/1.1
User-Agent: Axis2
SOAPAction: http://172.16.10.103:8080/AgendaPesquisa#AgendaPesquisa
Host: pfdesenv.planetarium.com.br:8080
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8

102
<?xml version='1.0' encoding='UTF-8'?>
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
     <soapenv:Header />
     <soapenv:Body>
        <AgendaPesquisa xmlns="http://localhost:8080/";>
           <tipo>C</tipo>
        </AgendaPesquisa>
     </soapenv:Body>
  </soapenv:Envelope>0


What are these characters? the server is not responding my requests.

The code I used to generate this message is bellow:

  public static void main (String[] agrv) throws AxisFault,
MalformedURLException {
        final EndpointReference targetEPR = new
                    EndpointReference("http://localhost:8080/pfappspabxutils";);
        try {
                 ServiceClient client = new ServiceClient();
                 Options options = new Options();
                 options.setTo(targetEPR);
                 options.setAction

("http://172.16.10.103:8080/AgendaPesquisa#AgendaPesquisa";);
                 client.setOptions(options);
                 client.sendReceive(getOMElement());
        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        }
   }

   public static OMElement getOMElement() {
       OMFactory fac = OMAbstractFactory.getOMFactory();
       OMElement method = fac.createOMElement("AgendaPesquisa", null);
       method.declareDefaultNamespace("http://localhost:8080/";);
       OMElement value = fac.createOMElement("tipo", null);
       value.addChild(fac.createOMText(value, "C"));
       method.addChild(value);
       return method;
   }

thank you,
bruno

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

Reply via email to