Jax-WS Client - Change Endpoint Address "https" to "http" - Cause HTTP 302

Hi,
I don't know it is a bug or not, but i couldn't find any answer for this.
I try to write a client for an SSL Secured and Basic Authenticated web service. To access the WSDL url, i have a VPN connection to that network. Also i registered their certificate to the JVM that i used to run the Client.
To create Jax-WS Client codes, i used "......\jaxws-ri\bin\wsimport.bat -s src -d bin -p model https://xxxx.com/xxxxxx.asmx?WSDL" as explained.
After successfully generated sources, i added my "SecurityEnvironmentHandler.java" to catch Username and Password callbacks, and also added "SecurityHandler.java" to register my handler and surrund with necessary SOAP Header Security tags. I register them as explained too.
Everything looks fine, but when i try to run Client test which basically call one of the services, i get
com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 302: Found
     at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:203)
     at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:177)
     at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
     at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
     at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
     at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
     at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
     at com.sun.xml.ws.client.Stub.process(Stub.java:222)
     at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
     at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
     at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
     at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
     at $Proxy36.xxxxxxxxxxx(Unknown Source)
     at xxxxxxxxServisImpl.xxxxxxxxxxxxx(xxxxServisImpl.java:69)
     at xxxxxxxxxServisTest.testxxxxxxx(xxxxxxServisTest.java:57)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)( i have changed some unnecessary parts with "xxxxxx" )
The basic of it i get an "*HTTP 302*" which means it tries to redirect the request.
Also i had an working copy of a sample Client which was written with Jax-RPC. I looked the generated SOAP Messages for both of clients, they was almostly the same.
After lots of tries, i found the problem, somehow after the client application starts, it changes the Endpoint Address "https://xxxxxxxx.com/xxxx.asmx" to "http://xxxxxxxxx.com/xxx.asmx", ( it drops the "s" wich means it changes the protocol HTTPS to HTTP ).
If i set the Endpoint Address to "https://xxxxxxxx.com/xxxx.asmx" before calling any service on port, it works as it should be.
On the "generated" main WebServiceClient class the WSDL address and also Endpoint Address were set correctly ( with https ).
Also do i missing any logical part of it? Because i didnt changed it, it generated from WSDL by using "wsimport", it couldnt be a mistake, of if it would be, somebody could see that.
Thanks for any advice.
Umut KUNDUKAN

Welcome to the forum. Please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
I'm locking this thread now.

Similar Messages

  • JMS transport - weblogic changes soap:address location="jms:.. to http

    Hi,
    Please help me to configure web service to use only jms transport.
    I try to create web service that uses JMS transport.
    I started from WSDL where I placed two elements:
    <soap:binding style="document"
                   transport="http://www.openuri.org/2002/04/soap/jms" />
    and
    <soap:address location="jms://host:7041/contextPathName/serviceUriName?URI=queueName" />
    Then in web service implementation I placed following annotation:
    @WLJmsTransport(contextPath = "contextPathName", serviceUri = "serviceUriName", portName = "portName", queue = "queueName", connectionFactory = "connectionFactoryName")
    Deployment is successful but when I look at generated WSDL (Admin console) I see that weblogic has changed <soap:address location="jms:.. to <soap:address location="http....
    And when I look at monitoring I see that port is using JMS transport.
    When I try to test my service using Admin console Test client I see that the queue is not used (Admin console/monitoring/Messages total is still 0) and service uses (I suppose) http transport.

    Hi,
    Please change "http://www.openuri.org/2002/04/soap/jms" to http://www.openuri.org/2002/04/soap/jms/ for soap1.1 or http://www.openuri.org/2002/04/soap12/jms/ for soap1.2.
    There must be some mismatch between edoc and implementation.
    -LJ

  • Jax-ws 2.2.8 and ws-addressing: Client throwing java.lang.NullPointerException on receipt of HTTP 202 when using non-anonymous ReplyTo address

    Server: JBoss EAP 6.2.0
    Client: JDK 1.7.0_51 x64
    JAX-WS: RI 2.2.8 ( via -Djava.endorsed.dirs )
    I am getting a java.lang.NullPointerException when calling the operation on the WS endpoint from the client when using non-anonymous replyTo address.
    I have simplified the scenario into a small test case that hopefully others can replicate. Since the exception is happening on the client instead of the server, I would think that the container used is irrelevant, but I have specified it nonetheless.
    1) WebService:
    package test.webservice;
    import java.util.Random;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.xml.ws.soap.Addressing;
    @WebService(targetNamespace="http://services.nowhere.org/")
    @Addressing(required=true)
    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
    public class RandomTest {
        @WebMethod
        public long nextRandom(@WebParam boolean forceException) throws Exception {
            if( forceException ) {
                throw new Exception("Some exception");
            Random rand = new Random();
            return rand.nextLong();
    2) Generated WSDL by JBossEAP 6.2.2:
    <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://webservice.test/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="RandomTestService" targetNamespace="http://webservice.test/">
      <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservice.test/" elementFormDefault="unqualified" targetNamespace="http://webservice.test/" version="1.0">
      <xs:element name="nextRandom" type="tns:nextRandom"/>
      <xs:element name="nextRandomResponse" type="tns:nextRandomResponse"/>
      <xs:complexType name="nextRandom">
        <xs:sequence/>
      </xs:complexType>
      <xs:complexType name="nextRandomResponse">
        <xs:sequence>
          <xs:element name="return" type="xs:long"/>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
      </wsdl:types>
      <wsdl:message name="nextRandom">
        <wsdl:part element="tns:nextRandom" name="parameters">
        </wsdl:part>
      </wsdl:message>
      <wsdl:message name="nextRandomResponse">
        <wsdl:part element="tns:nextRandomResponse" name="parameters">
        </wsdl:part>
      </wsdl:message>
      <wsdl:portType name="RandomTest">
        <wsdl:operation name="nextRandom">
          <wsdl:input message="tns:nextRandom" name="nextRandom" wsam:Action="http://webservice.test/RandomTest/nextRandomRequest" wsaw:Action="http://webservice.test/RandomTest/nextRandomRequest">
        </wsdl:input>
          <wsdl:output message="tns:nextRandomResponse" name="nextRandomResponse" wsam:Action="http://webservice.test/RandomTest/nextRandomResponse" wsaw:Action="http://webservice.test/RandomTest/nextRandomResponse">
        </wsdl:output>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="RandomTestServiceSoapBinding" type="tns:RandomTest">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsaw:UsingAddressing wsdl:required="true"/>
        <wsp:PolicyReference URI="#RandomTestServiceSoapBinding_WSAM_Addressing_Policy"/>
        <wsdl:operation name="nextRandom">
          <soap:operation soapAction="" style="document"/>
          <wsdl:input name="nextRandom">
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="nextRandomResponse">
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="RandomTestService">
        <wsdl:port binding="tns:RandomTestServiceSoapBinding" name="RandomTestPort">
          <soap:address location="http://localhost:8080/servertest/RandomTest"/>
        </wsdl:port>
      </wsdl:service>
        <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="RandomTestServiceSoapBinding_WSAM_Addressing_Policy"><wsam:Addressing><wsp:Policy/></wsam:Addressing></wsp:Policy>
    </wsdl:definitions>
    3) ant build.xml to generate the client code from WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <project default="build" basedir="..">
        <property name="jaxws.classpath" location="C://jaxws-2.2.8/jaxws-ri/lib/*.jar"/>
        <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
               <classpath path="${jaxws.classpath}"/>
        </taskdef>
        <target name="build" >
            <!-- For these to work, the JAR files in tools/jaxws-ri must be included in Ant's classpath -->
            <wsimport wsdl="http://localhost:8080/servertest/RandomTest?wsdl"
                   verbose="true"
                   sourcedestdir="src"
                   destdir="bin"
                   keep="true">
                   <xjcarg value="-enableIntrospection"/>
            </wsimport>
        </target>
    </project>
    4) Client code
    4a) ClientTest.java - Actual client run from client
    package test.wsclient;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.ws.BindingProvider;
    import javax.xml.ws.Endpoint;
    import javax.xml.ws.handler.Handler;
    import javax.xml.ws.soap.AddressingFeature;
    import org.nowhere.services.RandomTest;
    import org.nowhere.services.RandomTestService;
    public class ClientTest {
        public static void main(String args[]) throws Exception {
            ClientTest app = new ClientTest();
            app.testAddressing();
        public void testAddressing() throws Exception {
            String REPLY_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallback";
            String FAULT_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallbackFault";
            RandomTestService service = new RandomTestService();
            RandomTest port = service.getRandomTestPort(new AddressingFeature());
            BindingProvider provider = (BindingProvider) port;
            // pass the replyTo address to the handler
            provider.getRequestContext().put("ReplyTo", REPLY_TO_ADDRESS);
            provider.getRequestContext().put("FaultTo", FAULT_TO_ADDRESS);
            // Register handlers to set the ReplyTo and FaultTo on the SOAP request sent to the WS endpoint
            List<Handler> handlerChain = new ArrayList<Handler>();
            handlerChain.add(new ClientHandler());
            provider.getBinding().setHandlerChain(handlerChain);
            // Start endpoint to receive callbacks from WS
            Endpoint endpoint = Endpoint.publish(REPLY_TO_ADDRESS, new CallbackSEI());
            try {
                port.nextRandom(false);
            } catch( Exception ex ) {
                ex.printStackTrace();
            } finally {
                Thread.sleep(10000);
            endpoint.stop();
            System.exit(0);
    4b) ClientHandler.java - Used to set the wsa ReplyTo address and FaultTo address when sending SOAP request from client to server
    package test.wsclient;
    import java.util.Set;
    import javax.xml.namespace.QName;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.ws.handler.MessageContext;
    import javax.xml.ws.handler.MessageContext.Scope;
    import javax.xml.ws.handler.soap.SOAPHandler;
    import javax.xml.ws.handler.soap.SOAPMessageContext;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class ClientHandler implements SOAPHandler<SOAPMessageContext> {
        public ClientHandler() {};
        @Override
        public Set<QName> getHeaders() {
            return null;
        @Override
        public void close(MessageContext arg0) {
        @Override
        public boolean handleFault(SOAPMessageContext context) {
            return true;
        protected void setAnAddress(SOAPHeader header, String tagName, String address) {
            NodeList nodeListReplyTo = header.getElementsByTagName(tagName);
            NodeList nodeListAddress = nodeListReplyTo.item(0).getChildNodes();
            for (int i = 0; i < nodeListAddress.getLength(); i++) {
                Node node = nodeListAddress.item(i);
                if ("Address".equals(node.getLocalName())) {
                    node.setTextContent(address);
                    break;
        protected String getMessageID(SOAPHeader header) {
            NodeList nodeListMessageId = header.getElementsByTagName("MessageID");
            return nodeListMessageId.item(0).getTextContent();
        @Override
        public boolean handleMessage(SOAPMessageContext context) {
            Boolean isOutbound = (Boolean) context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY);
            if (isOutbound) {
                try {
                    SOAPEnvelope envelope = context.getMessage().getSOAPPart().getEnvelope();
                    SOAPHeader header = envelope.getHeader();
                    /* extract the generated MessageID */
                    String messageID = getMessageID(header);
                    context.put("MessageID", messageID);
                    context.setScope("MessageID", Scope.APPLICATION);
                    /* change ReplyTo address */
                    setAnAddress(header, "ReplyTo", (String) context.get("ReplyTo"));
                    setAnAddress(header, "FaultTo", (String) context.get("FaultTo"));
                } catch (Exception ex) {
                    throw new RuntimeException(ex);
            return true;
    4c) CallbackSEI.java - endpoint on the client for server to send the SOAP response back to the client
    package test.wsclient;
    import javax.annotation.Resource;
    import javax.jws.Oneway;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.xml.ws.Action;
    import javax.xml.ws.RequestWrapper;
    import javax.xml.ws.WebServiceContext;
    import javax.xml.ws.soap.Addressing;
    @WebService
    @Addressing
    //@HandlerChain(file = "/handler-chain.xml")
    public class CallbackSEI {
        @Resource
        private WebServiceContext context;
         * If there is no namespace specified in the method below, then the CallbackSEI needs to be in the same package as the
         * WS endpoint.
        @Oneway
        @Action(input="http://services.nowhere.org/RandomTest/nextRandomResponse")
        @RequestWrapper(localName="nextRandomResponse", targetNamespace="http://services.nowhere.org/")
        public void handleNotification(@WebParam(name="return")long random) {
            System.out.println("Asynch response received");
            System.out.println( random );
            //System.out.println("This response relates to the message ID: "+ getMessageID());
    In summary:
    Server is listening on port 8080
    Client will listen in port 8082 for the callback from the server for the SOAP response
    Now when I run the client, I see that the proper behaviour as far as ws-addressing is concerned. That is:
    client  -- SOAP request ( on port 8080 ) --> server
    client <-- HTTP 202 ( empty HTTP body )  --- server
    client <-- SOAP response ( on port 8082 )  --- server
    All well and good, except that I am getting a NullPointerException on the client side when I call the operation.
    With debugging of the SOAP request and responses, I get the following output:
    ---[HTTP request - http://localhost:8080/servertest/RandomTest]---
    Accept: text/xml, multipart/related
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "http://services.nowhere.org/RandomTest/nextRandomRequest"
    User-Agent: JAX-WS RI 2.2.8 svn-revision#13980
    <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/servertest/RandomTest</To><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomRequest</Action><ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
        <Address>http://localhost:8082/servertest/RandomCallback</Address>
    </ReplyTo><FaultTo xmlns="http://www.w3.org/2005/08/addressing">
        <Address>http://localhost:8082/servertest/RandomCallbackFault</Address>
    </FaultTo><MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</MessageID></S:Header><S:Body><ns2:nextRandom xmlns:ns2="http://services.nowhere.org/"><arg0>false</arg0></ns2:nextRandom></S:Body></S:Envelope>--------------------
    ---[HTTP response - http://localhost:8080/servertest/RandomTest - 202]---
    null: HTTP/1.1 202 Accepted
    Content-Length: 0
    Content-Type: text/xml;charset=UTF-8
    Date: Fri, 18 Jul 2014 08:34:36 GMT
    Server: Apache-Coyote/1.1
    java.lang.NullPointerException
        at com.sun.proxy.$Proxy38.nextRandom(Unknown Source)
        at test.wsclient.ClientTest.testAddressing(ClientTest.java:43)
        at test.wsclient.ClientTest.main(ClientTest.java:18)
    ---[HTTP request]---
    Cache-control: no-cache
    Host: localhost:8082
    Content-type: text/xml; charset=UTF-8
    Content-length: 704
    Connection: keep-alive
    Pragma: no-cache
    User-agent: Apache CXF 2.7.7.redhat-1
    Accept: */*
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomResponse</Action><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:65d8d7fc-09e4-494a-a9c5-0a01faf4d7e6</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8082/servertest/RandomCallback</To><RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</RelatesTo></soap:Header><soap:Body><ns2:nextRandomResponse xmlns:ns2="http://services.nowhere.org/"><return>2870062781194370669</return></ns2:nextRandomResponse></soap:Body></soap:Envelope>--------------------
    Asynch response received
    2870062781194370669
    As you can see from the output above, the proxy is throwing an Exception when it receives the HTTP 202 response.
    Any ideas ?

    I think I have found when I get this error and probably I have found a bug. I will appreciate if someone can confirm this.
    In my BPEL project setup, my BPEL process's wsdl file imports another wsdl from different namespace. Here is sample snippet -
    <wsdl:definitions targetNamespace="http://namespace/1">
    <wsdl:import namespace="http://namespace/2" location="resources/another.wsdl"/>
    <plnk:partnerLinkType....../>
    </wsdl:definitions>
    Please let me know. I checked the bundled samples with Oracle BPEL PM and did not find any similar case where process wsdl imports another wsdl.
    Thank you.
    Meghana

  • How can I change namespace prefix for JAX-RPC client request?

    I'm creating a JAX-RPC client to invoke a RPC/encoded web service. The service was generated from a ColdFusion program and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently the client is sending requests with the prefix "env" and I'd like to change it to "soapenv".
    I created a type of javax.xml.rpc.handler.GenericHandler and attempted to do the follow:
    @Override public boolean handleRequest(MessageContext p1) {
         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 
         try {
              SOAPPart part = msg.getSOAPPart();
              SOAPEnvelope envelope = part.getEnvelope(); 
              envelope.setPrefix("soapenv"); 
              msg.saveChanges(); 
         } catch(SOAPException ex) {
              // TODO
              return false;
         return true;
    However I get the following exception:
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED
    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)
    at test.MyHandler.handleRequest(MyHandler.java:33)
    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)
    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)
    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)
    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)
    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)
    Is there any workaround? I appreciate any feedback.
    Thanks, Bill

    What I ended up doing is converting the SOAP message to a string, replacing the namespace prefix and converting it back to a SOAP message.
    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
          String soapString = convertSOAPToString(soapMessage);
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
          soapMessageContext.setMessage(newSoapMessage);
          return true;
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          return stringWriter.toString();   
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
             StreamSource source = new StreamSource(byteInputStream);
             // Set contents of message
             soapPart.setContent(source);       
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          return soapMessage;
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO

  • ACE:LB several https services using same client(public) IP address

    Works perfectly with http but doesn't with https:
    class-map type http loadbalance match-all domain_mysite2
      2 match http header Host header-value "www.mysite2.com"
    class-map match-any vip_http
      2 match virtual-address 192.168.99.100 tcp eq www
    class-map match-any vip_https
      2 match virtual-address 192.168.99.100 tcp eq https
    policy-map type loadbalance first-match L7_policymap
      class domain_mysite2
        serverfarm sfarm_SFARM2
      class class-default
        serverfarm sfarm_SFARM1
    policy-map multi-match L4_policymap
      class vip_http
        loadbalance vip inservice
        loadbalance policy L7_policymap
        loadbalance vip icmp-reply active
      class vip_https
        loadbalance vip inservice
        loadbalance policy L7_policymap
        loadbalance vip icmp-reply active
    Need urgent help.

    Hi Antonio,
    Have a look at this below as well for details.
    Example of an SSL Termination Configuration
    The following example illustrates a running configuration of the ACE acting as an SSL proxy server; terminating SSL or TLS connections from a client and then establishing a TCP connection to an HTTP server. When the ACE terminates the SSL or TLS connection, it decrypts the cipher text from the client and transmits the data as clear text to the HTTP server. The SSL termination-specific configuration elements appear in bold in the example.
    access-list ACL1 line 10 extended permit ip any any
    probe https GEN-HTTPS
      port 80
      interval 50
      faildetect 5
      expect status 200 200
    rserver SERVER1
      ip address 172.27.16.11
        inservice
    rserver SERVER2
      ip address 172.27.16.12
        inservice
    rserver SERVER3
      ip address 172.27.16.13
        inservice
    rserver SERVER4
      ip address 172.27.16.14
        inservice
    serverfarm host SFARM1
      description SERVER FARM 1 FOR SSL TERMINATION
      probe GEN-HTTPS
      rserver SERVER1 80
        inservice
      rserver SERVER2 80
        inservice
    serverfarm host SFARM2
      description SERVER FARM 2 FOR SSL TERMINATION
      probe GEN-HTTPS
      rserver SERVER3 80
        inservice
      rserver SERVER4 80
        inservice
    parameter-map type ssl PARAMMAP_SSL_TERMINATION
      cipher RSA_WITH_3DES_EDE_CBC_SHA
      cipher RSA_WITH_AES_128_CBC_SHA priority 2
      cipher RSA_WITH_AES_256_CBC_SHA priority 3
      version all
    parameter-map type connection TCP_PARAM
      syn-data drop
      exceed-mss allow
    ssl-proxy service SSL_PSERVICE_SERVER
      ssl advanced-options PARAMMAP_SSL_TERMINATION
      key MYKEY.PEM
      cert MYCERT.PEM
    class-map type http loadbalance match-all L7_SERVER_CLASS
      description Sticky for SSL Testing
      2 match http url .*.jpg
      3 match source-address 192.168.130.0 255.255.255.0
    class-map type http loadbalance match-all L7_SLB-HTTP_CLASS
      2 match http url .*
      3 match source-address 192.168.130.0 255.255.255.0
    class-map match-all L4_SSL-TERM_CLASS
      description SSL Termination VIP
      2 match virtual-address 192.168.130.11 tcp eq https
    policy-map type loadbalance first-match L7_SSL-TERM_POLICY
      class L7_SERVER_CLASS
        serverfarm SFARM1
        insert-http I_AM header-value "SSL_TERM"
        insert-http SRC_Port header-value "%ps"
        insert-http DEST_IP header-value "%id"
        insert-http DEST_Port header-value "%pd"
        insert-http SRC_IP header-value "%is"
      class L7_SLB-HTTP_CLASS
        serverfarm SFARM1
        insert-http I_AM header-value "SSL_TERM"
        insert-http SRC_Port header-value "%ps"
        insert-http DEST_IP header-value "%id"
        insert-http DEST_Port header-value "%pd"
        insert-http SRC_IP header-value "%is"
    policy-map multi-match L4_SSL-VIP_POLICY
      class L4_SSL-TERM_CLASS
        loadbalance vip inservice
        loadbalance policy L7_SSL-TERM_POLICY
        loadbalance vip icmp-reply
        ssl-proxy server SSL_PSERVICE_SERVER
        connection advanced-options TCP_PARAM
    interface vlan 120
      description Upstream VLAN_120 - Clients and VIPs
      ip address 192.168.120.1 255.255.255.0
      fragment chain 20
      fragment min-mtu 68
      access-group input ACL1
      nat-pool 1 192.168.120.70 192.168.120.80 netmask 255.255.255.0 pat
      service-policy input L4_SSL-VIP_POLICY
      no shutdown
    ip route 10.1.0.0 255.255.255.0 192.168.120.254
    Regards,
    Kanwal

  • JAX-RPC client access a JAX-WS services

    Hello all,
    There is a little problem I had with webservices and googling for a solution has not help so far.
    I am accessing a JAX-WS webservice from a J2SE 1.4.2 JAX-RPC client application and getting a NoSuchMethodError error from one of the stubs at runtime. The method call is rather a HelloWorld concept but it has not been possible.
    This are the step I took (I am using netbeans 6.0).
    1. I downloaded the JAX-RPC plugin on netbeans
    2. Download the stubs using the wsdl url. I am using the netbeans wizard for this process.
    3. Write my code for get a handle to the endpoint. Using the ServiceFactory.loadClass().
    4. Call the method on the
    Can anyone please help me.

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • Asynchronous client call - WS-Addressing

    Hi,
    I’m trying to initiate an asynchronous BPEL process from an external SOAP client i.e. the client calls the BPEL process and it calls back with a response.
    I can see from the Dev Guide that a WS-Addressing ReplyTo is required within the client request but from experimenting it seems that this must contain not just the mandatory Address but also the optional PortType and ServiceName elements (filled out with the QNames for the portType and service within the WSDL). Otherwise I get SOAP Faults back indicating Null pointers or Class Not Found. Once these are included the callback to the client works fine. Can you confirm that these elements are in fact required?
    Also why should the ServiceName be necessary as the physical callback endpoint is supplied by the client via the Address Element (the service in the WSDL just has a placeholder http://set.by.caller)? For that matter, shouldnt the BPEL process already know the callback portType already (as it'll be part of its invoke settings)?
    Many thanks,
    James
    www.magoosoft.com

    The ServiceName and PortType can be figured out at BPEL engine side. This is acutally a bug that we fixed for 10.1.2 GA.
    Thanks for your feedback.
    - Rakesh

  • User's right to change Ip address

    Hello,
    I have windows XP and winodws 7, I am giving right to domain users' he or she can change IP address.
    regards,
    Ameet Kumar
    [email protected]

    Hi,
    >>Why on earth would anyone want users to change IP addresses?
    Before going further, I have the same doubt with Narcoticoo’s.
    As suggested by Narcoticoo, we can use Restricted Groups to grant domain users local Network Configuration Operators right. Besides, we can also use  GPP Local Users
    and Groups, or scripts to do this.
    Regarding this point, the following blog can be referred to for more information.
    Controlling local group membership with GPO
    http://windows.stanford.edu/Public/Infrastructure/LocalGroupGPO.html
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    In addition, for we have Windows XP clients, if we use GPP, we must install client-side extensions of GPP for Windows XP on these clients.
    Regarding this point, the following article can be referred to for more information.
    Group Policy Preferences Getting Started Guide
    http://technet.microsoft.com/en-us/library/cc731892(v=WS.10).aspx
    Best regards,
    Frank Shen

  • Exception when running a JAX-WS client against a JAX-RPC service

    I have a JAX-WS client invoking a JAX-RPC web service on Weblogic 10.3. The service was originally built for Weblogic 9.2, it's been rebuilt and runs fine on 10.3.
    Some operations work fine, but invoking one operation results in the following exception:
    at secsvc.client.GetRolesForUserInApplicationResponse$JaxbAccessorF_role.get(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.reflect.NullSafeAccessor.get(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.getUnadapted(Unknown Source)
         at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$7.get(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit$PartBuilder.readResponse(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.readResponse(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
         at $Proxy29.getRolesForUserInApplication(Unknown Source)
    This operation works fine if invoked by an RPC client.
    Any idea what's going on?
    Mikey

    Hi Jitu,
    I changed the wsdl. And so I don�t get the warning anymore. My Webservice also runs well, now. Thanks anyway for the reply.
    There is a nice tech article on the sun network, which solved my problem. The basic idea is to split the wsdl into 2 wsdl documents. one containing all the porttypes messages and so on. And the other wsdl contains the binding and service elements.
    If you are interested check out this link:
    http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index2.html
    thanks,
    footman

  • Client change Ip

     In my Office server install window 2008 r2 and client use Window 7 on domain. Some users change ip address i just want to restrict that they cant change ip address without administrator permittion.  

    Hi,
    Please check whether you have configured domain users as local admin using Group Policy Preferences.
    Checkout the below link for more information,
    http://www.grouppolicy.biz/2010/01/how-to-use-group-policy-preferences-to-secure-local-administrator-groups/
    Regards,
    Gopi
    JiJi
    Technologies

  • Help! I have a new iPhone 5s. My husband just lost his 4s, so I want to give him mine. Want to use same Apple ID so we both have access to itunes/apps purchases. Want to separate contacts, messages, mail, etc. I cannot change iCloud address.

    Help! I have a new iPhone 5s. My husband just lost his 4s, so I want to give him my 4s. We want to use same Apple ID so we both have access to itunes/apps purchases. Want to separate contacts, messages, mail, etc. I cannot change iCloud address on 4s iPhone. Also, when I tried to change iMessage I got a message that if I deleted my id (which seemed to be the only way to get my husband's I'd there), I would not be able to receive iMessages on any device.
    Would someone kindly tell me how to set up th 4s for my husband so that we can keep our info separate? It would be most appreciated! Thanks!!

    Hey Fagen!
    You will want to see the following article for guidance on achieving the result you wish to achieve:
    What to do before selling or giving away your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/ht5661
    I would just follow the instructions from this article to give your unused 4s to your spouse. Since you have already started using your 5s, you will still be receiving iMessages on that phone and will have no need to receive them on a device that has been replaced. Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • How to change email address in my jdc profile

    I want to change email address in my profile. Can anyone tell me how to do it?

    http://forum.java.sun.com/thread.jsp?forum=31&thread=299784

  • I got a new e-mail address and I reset my iPod so it already has the new email address. I can't seem to change the address on my iPad or iPhone. Please help me change the address on all my devices!

    I got a new email address and I reset the iPod so it already has the new address. I can't seem to change the address on my iPhone5 or iPad. So please help! How do I change the address for my apple ID and icloud on all my devices? I don't want to reset my iPad and phone just to set new email address I can't do updates without the password and I have forgotten my password for my old email address. Please Help! Getting frustarted!

    If the old ID ("email address") is yours, and if your current ID was created by editing the details of this old ID (rather than being an entirely new ID), go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Oracle 10g AS - change of address in IE addressbar

    Hello,
    Users of my Application has to put following address in the addressbar of IE:
    http://some.ip.address:8889/forms90/f90servlet
    but I want to configure it in a way that they simply have put my domain name e.g.
    http://myApplication/
    or
    http://myDomainName/application
    or
    http://myDomainName/application.html
    or
    http://myDomainName/application/index.html
    Any suggestions, please its urgent

    1. Don't use a IP, use the computer hostname
    2. You can create addional names in your DNS server
    3. If you want to call an URL without specifying port number, then you have to change the port on Application Server to Port 80
    4. You can add virtual path like applications and in the index.html (or application.html) program a re-direct
    Regards,
    Martin

Maybe you are looking for

  • ISE Certainty calculation

               Hello We  have a profiling policy for a firm XP device, and I am tring to see each if it passes the 6 rules that we have I am. this is forour legacy machines which we will kill when xp dies and all new machines will have dot1x configured.

  • Custom icons not showing up in installer dialogs

    What are the steps that are required to get a custom icon to show up in the installation dialogs? I have custom icons setup in the application descriptor xml file for my app... and they do show up in the OS after I install the application but I don't

  • KeyEvent on dynamically generated Buttons - AWT

    hi, I have posted the below in Swing forum and was adviced to post this type of questions in AWT forum. I got a solution jbutton.setMnemonic(int keycode) and that can be used only in JButton, I believe. Is there anything similar we can use in Button.

  • Replacement for document viewer region

    Hello, i used document viewer region to display PDF document in oaf page. It works fine but I don't want to see the drop down to select the format type and export button. Is there any way to embed PDF in oaf without using document viewer region? what

  • Can Lightroom 5 corrupt RAW files?

    I just started using Lightroom 5 and the following thing has happened to me twice within an hour. Normally, I first rank the photos and then tweak a bit the 4* photos before I export them. So I go through every file at least once, if not twice. As I