Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-983

Configure SOAPAction on the Call object

    Details

      Description

      factory = ServiceFactory.newInstance();
      service = factory.createService(SERVICE);

      call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "ConversionRate"));
      call.addParameter("FromCurrency", Constants.TYPE_LITERAL_STRING, ParameterMode.IN);
      call.addParameter("ToCurrency2", Constants.TYPE_LITERAL_STRING, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_DOUBLE);
      call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
      call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAP_ACTION);
      call.setTargetEndpointAddress(ENDPOINT);

      POST /CurrencyConvertor.asmx HTTP/1.1
      SOAPAction: ""
      Content-Type: text/xml; charset=UTF-8
      User-Agent: Java/1.5.0_07
      Host: www.webservicex.net
      Accept: text/html, image/gif, image/jpeg, ; q=.2, */; q=.2
      Connection: keep-alive
      Content-Length: 260

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Header/>
      <env:Body>
      <ns1:ConversionRate xmlns:ns1="http://www.webserviceX.NET/">
      <FromCurrency>EUR</FromCurrency>
      <ToCurrency2>USD</ToCurrency2>
      </ns1:ConversionRate>
      </env:Body>
      </env:Envelope>

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  thomas.diesler Thomas Diesler
                  Reporter:
                  thomas.diesler Thomas Diesler
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: