6 Replies Latest reply on Apr 21, 2008 12:44 PM by claprun

    WSRP: SAP EP versus JBoss

    walfreund

      Hi folks,

      upon trying to connect JBoss and SAP EP over WSRP I'm struggling on both sides of the WSRP-world - neither SAP as consumer (an issue with consumer agent string) nor SAP as producer likes to talk WSRP.
      My latest exception is about cookie headers, wow. It seems like the cookie information length is simply too much... ?

      Did anyone stumble across something like this before or can explain this issue to me?

      2008-03-17 23:50:28,477 DEBUG [org.jboss.ws.core.client.RemotingConnectionImpl] Get locator for: [addr=http://sapdemoce04:50000/irj/servlet/prt/soap/AutoGenProducer1_0?style=doc_lit,props={javax.xml.rpc.service.endpoint.address=http://sapdemoce04:50000/irj/servlet/prt/soap/AutoGenProducer1_0?style=doc_lit}]
      2008-03-17 23:50:28,478 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@1655aac connecting
      2008-03-17 23:50:28,478 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@1655aac connected
      2008-03-17 23:50:28,478 DEBUG [org.jboss.ws.core.client.RemotingConnectionImpl] Remoting metadata: {HEADER={SOAPAction="urn:oasis:names:tc:wsrp:v1:getServiceDescription", Content-Type=text/xml; charset=UTF-8}, NoThrowOnError=true}
      2008-03-17 23:50:28,478 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Setting request header with SOAPAction : "urn:oasis:names:tc:wsrp:v1:getServiceDescription"
      2008-03-17 23:50:28,478 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Setting request header with Content-Type : text/xml; charset=UTF-8
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.soap.SOAPMessageUnMarshaller] getMimeHeaders from: {Set-Cookie=[JSESSIONID=(J2EE5390400)ID0043229050DB10711443334707187519End; Version=1; Path=/, saplb_*=(J2EE5390400)5390450; Version=1; Path=/], ResponseCodeMessage=OK, Date=[Tue, 25 Mar 2008 13:44:26 GMT], Content-Type=[text/xml], Server=[SAP J2EE Engine/7.00], HEADER={SOAPAction="urn:oasis:names:tc:wsrp:v1:getServiceDescription", Content-Type=text/xml; charset=UTF-8}, Transfer-Encoding=[chunked], NoThrowOnError=true, ResponseCode=200}
      2008-03-17 23:50:28,483 DEBUG [org.jboss.portal.faces.loader.FacesClassLoader] Want to load org.jboss.ws.core.soap.EnvelopeBuilderDOM will delegate
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] createMessage: [contentType=text/xml]
      2008-03-17 23:50:28,483 DEBUG [org.jboss.remoting.InvokerRegistry] removed org.jboss.remoting.transport.http.HTTPClientInvoker@1655aac from registry
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC] Begin response processing
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl] Enter: handleResponse
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl] Exit: handleResponse with status: true
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC] unbindResponseMessage: {urn:oasis:names:tc:wsrp:v1:intf}getServiceDescription
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.EndpointInvocation] setReturnValue: org.jboss.ws.core.soap.SOAPBodyElementDoc
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl] Enter: handleResponse
      2008-03-17 23:50:28,483 WARN [org.jboss.ws.core.jaxrpc.handler.HandlerWrapper] RuntimeException in handler method, transition to DOES_NOT_EXIST
      2008-03-17 23:50:28,483 DEBUG [org.jboss.ws.core.jaxrpc.handler.HandlerWrapper] destroy: org.jboss.portal.wsrp.handler.RequestHeaderClientHandler@1478e10
      2008-03-17 23:50:28,483 ERROR [org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl] RuntimeException in response handler
      java.lang.IllegalArgumentException: Too many cookie headers!
      Cookie headers:
       0: JSESSIONID=(J2EE5390400)ID0043229050DB10711443334707187519End; Version=1; Path=/
       1: saplb_*=(J2EE5390400)5390450; Version=1; Path=/
      
       at org.jboss.portal.wsrp.handler.RequestHeaderClientHandler.handleResponse(RequestHeaderClientHandler.java:125)
       at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleResponse(HandlerWrapper.java:142)
       at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleResponseInternal(HandlerChainBaseImpl.java:364)
       at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleResponse(HandlerChainBaseImpl.java:329)
       at org.jboss.ws.core.jaxrpc.client.CallImpl.callResponseHandlerChain(CallImpl.java:567)
       at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:374)
       at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
       at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
       at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
       at $Proxy279.getServiceDescription(Unknown Source)
       at org.jbo
      .... 4.000.000 lines of error code more ...
      


        • 1. Re: WSRP: SAP EP versus JBoss
          claprun

          It actually looks like a mistake on my end... I have to check why I check the number of cookies and throw an exception if there is more than one but, right now, I don't see any reason not to allow more cookies...
          As far as the consumer agent string goes, I will implement a configuration switch so that people using a non-conforming consumer can relax the validation our producer performs...

          • 2. Re: WSRP: SAP EP versus JBoss
            walfreund

            Thanks Chris!

            The cookie handling might be a bug needing a fix, while the consumer agent string is a completely different thing. Maybe there should be an option to enable WSRP-strictness or WSRP-sloppyness. By selecting the sloppy implementation, JBoss would row in with all the commercial portals and implement a weaker conformity while the strict thing would cause my forehead to meet my nape more soon.

            Btw: There is a ticket about the consumer agent string in progress at the sapoids.

            However, thanks for your support!

            • 4. Re: WSRP: SAP EP versus JBoss
              claprun

              The cookie handling should be fixed in subversion. I need to test it more and it'd actually be helpful if you could try the latest version of Portal 2.6 and let me know if it fixes your issue.

              • 5. Re: WSRP: SAP EP versus JBoss
                walfreund

                I'm going to check this by the end of the week. An interesting point is that commercial competitors (such as Oracle Portal) do not like SAP Logon Tickets as well and complain about the Cookie format.
                maybe this is off-topic, but anyway - here's the soap message of Oracle Portal in the same scenario. You're not alone in a dark world of weak standard implementations...

                <?xml version="1.0" encoding="UTF-8"?>
                <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="urn:oasis:names:tc:wsrp:v1:types">
                <env:Body>
                 <env:Fault xsi:type="env:Fault">
                 <faultcode>env:Server</faultcode>
                 <faultstring>oracle.webdb.wsrp.InvalidCookie</faultstring>
                 <detail>
                 <ns0:InvalidCookie/>
                 </detail>
                 </env:Fault>
                </env:Body>
                </env:Envelope>
                


                • 6. Re: WSRP: SAP EP versus JBoss
                  claprun

                  Did you get a chance to test the fix?