Package org.apache.soap.rpc

Examples of org.apache.soap.rpc.SOAPContext


            }

            BufferedReader br = null;
            if (spconn.receive() != null) {
                br = spconn.receive();
                SOAPContext sc = spconn.getResponseSOAPContext();
                // Set details from the actual response
                // Needs to be done before response can be stored
                final String contentType = sc.getContentType();
                result.setContentType(contentType);
                result.setEncodingAndType(contentType);
                int length=0;
                if (getReadResponse()) {
                    StringWriter sw = new StringWriter();
View Full Code Here


   *
   * @see #marshall(java.io.Writer, org.apache.soap.util.xml.XMLJavaMappingRegistry, org.apache.soap.rpc.SOAPContext)
   */
  public void marshall(Writer sink, XMLJavaMappingRegistry xjmr)
    throws IllegalArgumentException, IOException {
    marshall(sink, xjmr, new SOAPContext());
  }
View Full Code Here

   *
   * @see #unmarshall(org.w3c.dom.Node, org.apache.soap.rpc.SOAPContext)
   */
  public static Envelope unmarshall(Node src)
    throws IllegalArgumentException {
      return unmarshall(src, new SOAPContext());
  }
View Full Code Here

    StringWriter sw = new StringWriter();

    try
    {
      sw.write("{");
      marshall(sw, new SOAPContext());
      sw.write("}");
    }
    catch (Exception e)
    {
    }
View Full Code Here

    /* forward the content to the HTTP listener as an HTTP POST */
    Hashtable headers = new Hashtable ();
    headers.put (Constants.HEADER_SOAP_ACTION, actionURI);
    TransportMessage response;
    // This is the reponse SOAPContext. Sending it as a reply not supported yet.
    SOAPContext ctx;
    try
    {
        // Note: no support for multipart MIME request yet here...
        TransportMessage tmsg = new TransportMessage(new String (ba),
                                                     new SOAPContext(),
                                                     headers);
        tmsg.save();

        response = HTTPUtils.post (httpURL, tmsg,
                                   30000, null, 0);
View Full Code Here

            javax.jms.TextMessage m = (javax.jms.TextMessage) msg;
            String payloadStr = m.getText();

            // Get the response context.
            SOAPContext respCtx = new SOAPContext();
            respCtx.setRootPart(payloadStr, "text/xml");

            // Parse the incoming response stream.
            DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
            Document respDoc =
                xdb.parse(new InputSource(new StringReader(payloadStr)));
View Full Code Here

                if (body != null) {
                    if (verbose)
                        System.out.println("Message contained '" + body + "'");

                    TransportMessage tmsg =
                        new TransportMessage(body, new SOAPContext(), new Hashtable());
                    setOutGoingHeaders(msg, tmsg);
                    tmsg.save();

                    TransportMessage response = HTTPUtils.post(getServiceURL(msg), tmsg, 30000, null, 0);
                    payload = IOUtils.getStringFromReader(response.getEnvelopeReader());
View Full Code Here

            } else {
                StringWriter payloadSW = new StringWriter();
                env.marshall(payloadSW, smr, ctx);
                String id = destination.send(payloadSW.toString(), null);
                String response = destination.receiveString(id, syncTimeout);
                responseSOAPContext = new SOAPContext();
                responseSOAPContext.setRootPart(response, "text/xml");
                responseReader = new BufferedReader(new StringReader(response));
            }
        } catch (IOException ioe) {
          Trc.exception(ioe);
View Full Code Here

          

        wsifOp.setAsyncRequestID(new WSIFJMSCorrelationId(msgID));

        // SOAP doesn't like a null response so give it a dummy null
        responseSOAPContext = new SOAPContext();
        responseSOAPContext.setRootPart(DUMMY_RESPONSE, "text/xml");
        responseReader = new BufferedReader(new StringReader(DUMMY_RESPONSE));

    }
View Full Code Here

                    reqHeaders.put(header.getName(), header.getValue());
                }        
            }
            spconn.setMaintainSession(getMaintainSession());
            spconn.send(this.getUrl(), this.getSoapAction(), reqHeaders, msgEnv,
                    null, new SOAPContext());

            @SuppressWarnings("unchecked") // API uses raw types
            final Map<String, String> headers = spconn.getHeaders();
            result.setResponseHeaders(convertSoapHeaders(headers));

            if (this.getHeaderManager() != null) {
                this.getHeaderManager().setSOAPHeader(spconn);
            }

            BufferedReader br = null;
            if (spconn.receive() != null) {
                br = spconn.receive();
                SOAPContext sc = spconn.getResponseSOAPContext();
                // Set details from the actual response
                // Needs to be done before response can be stored
                final String contentType = sc.getContentType();
                result.setContentType(contentType);
                result.setEncodingAndType(contentType);
                int length=0;
                if (getReadResponse()) {
                    StringWriter sw = new StringWriter();
View Full Code Here

TOP

Related Classes of org.apache.soap.rpc.SOAPContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.