-
1. Re: What's the difference between 'official' Axis 1.1 and Jb
zeroman Mar 2, 2005 2:58 PM (in response to zeroman)"zeroman" wrote:
I'm trying to use Jboss-4.0.1 Axis 1.1 for accessing sforce.com WS.
Thanks.
Just want add a little. When I use Axis 1.2RC2 standalone version the code compiles and runs properly w/o any problems. Jbooss version 4.0.1, JDK 1.4.2. Axis libs are taken from the:
\jboss-4.0.1\server\default\deploy\jboss-ws4ee.sar\
What do you suggest in this case?
Can I attach or email this piece of code somewhere? -
2. Re: What's the difference between 'official' Axis 1.1 and Jb
thomas.diesler Mar 3, 2005 4:38 PM (in response to zeroman)JBossWS is about portable J2EE compliant web services, which by definitition should not have a dependency on a particular SOAP stack.
If sforce.com offers an example that uses standard J2EE WS clients, then this is the one you want to use.
The Axis example is irrelevant. -
3. Re: What's the difference between 'official' Axis 1.1 and Jb
thomas.diesler Mar 4, 2005 1:19 PM (in response to zeroman)The Axis example is irrelevant.
It is irrelevant for J2EE-1.4 compliant web services, it is good to have if you plan to use an Axis client, which JBossWS is not. -
4. Re: What's the difference between 'official' Axis 1.1 and Jb
zeroman Mar 9, 2005 4:50 AM (in response to zeroman)"thomas.diesler@jboss.com" wrote:
It is irrelevant for J2EE-1.4 compliant web services, it is good to have if you plan to use an Axis client, which JBossWS is not.
Thanks Thomas.
The main goal is to use JbossWS WITH sforce.com ws and other already running web-services from other 'vendors'. I'd like to do it in the simple manner but I see here is run-time error from the sforce.com service as it doesn't see 'session ID' I've set up to the SAOP header.
I don't see a reason for that now. Also I see a lot of questions in the JbossWS forum it's not a very good sign.
I'll try to ask for the 'J2EE-1.4 compliant web services' example.
Thank you. -
5. Re: What's the difference between 'official' Axis 1.1 and Jb
zeroman Mar 9, 2005 8:39 AM (in response to zeroman)"zeroman" wrote:
I'll try to ask for the 'J2EE-1.4 compliant web services' example.
Looking at the post:
"axis1.2 with tomcat 4 deployed in jboss4.01"
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=61200
I'd like to ask one more thing.
Is it possible to 'mix' usage of Jboss.NET and JbossWS libs by an accident?
I mean following...
I'm using several libraries for stub generation (WSDL2Java) and for testing ws access from the client console application. I'm using libs in class path:
jboss-4.0.1\server\default\deploy\jboss-ws4ee.sar\
axis-ws4ee.jar
commons-discovery.jar
commons-logging.jar
jboss-ws4ee.jar
- jboss-ws4ee.war - can be ommitted
wsdl4j.jar
I saw you were talking about: \lib\jboss-jaxrpc.jar, \lib\jboss-saaj.jar
bu I don't need them for my test class.
But I found I need one more library jboss-net-client.jar as test console client code fails w/o class org.jboss.net.jmx.adaptor.attributeSerFactory.
Is it right or am I doing something wrong? Does it mean I've mixed Jboss.NET and JbossWS? -
6. Something strang in the Jboss code.
zeroman Mar 9, 2005 1:25 PM (in response to zeroman)Hi Thomas.
I found something strange in the Jboss code. Can you explain me what happens there? What's the main difference between library versions? Is it possible to 'patch' it?
I'm using JbossWS libs from the
\jboss-4.0.1\server\default\deploy\jboss-ws4ee.sar\
I'm not sure if I use correct libraries... Correct me if I'm wrong.
As I told I was exploring sforce.com Axis examples. Their example works with Axis 1.2rc2 but doesn't work with JbossWS.
They have a code which sets SessionID into the SAOP header for the subsequent WS calls. Session Id is gotten from the first 'login' command.
It is described aspublic class SoapBindingStub extends org.apache.axis.client.Stub implements com.sforce.soap.enterprise.Soap ........ com.sforce.soap.enterprise.SoapBindingStub binding; ....
They are using the 'simple java bean Handler class for setting Session IDpublic class _SessionHeader implements java.io.Serializable { private java.lang.String sessionId; .... } com.sforce.soap.enterprise._SessionHeader sh = new _SessionHeader(); .... binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);
Class org.apache.axis.client.Stub
from the
\jboss-src-4.0.1\jaxrpc\src\main\org\apache\axis\client\Stub.java
doesn't have method with such signature.org.apache.axis.client.Stub.setHeader(String, String, Object);
althought that signature is present in the Axis 1.2RC2
So I use changed code assuming it will workbinding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.getSessionId());
but it doesn't work.
When I try to get this Header's valueObject sessionHeaderObject = s._getProperty("SessionHeader");
sessionHeaderObject is NULL.
----------------------
I was trying to get all headers using different libaries (JbossWS 4.0.1, Axis 1.2RC2. I used CODE like that:org.apache.axis.message.SOAPHeaderElement{} array = binding.getHeaders(); for (int i = 0; i < array.length; i++) { SOAPHeaderElementImpl soapHeaderElement = array{i}; javax.xml.soap.SOAPHeaderElement soapHeaderElement = array{i}; System.out.println("SAOP header element = " + soapHeaderElement.toString()); System.out.println("SAOP header getNamespaceURI = " + soapHeaderElement.getNamespaceURI()); System.out.println("SAOP header getPrefix = " + soapHeaderElement.getPrefix()); System.out.println("SAOP header element = " + soapHeaderElement.toString()); }
I was getting different RESULTS using :
class type of javax.xml.soap.SOAPHeaderElement from Axis 1.2RC2SAOP header element = <ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">njRq6Ptg37ohqutyqzZdicUzejphrTZe90b6Yx3XBYtMNeGJRcxMpik7n0_TXAXxHikyGE8ui0DF16GKmkejIzteaH1xyGi1</ns1:SessionHeader> SAOP header getNamespaceURI = urn:enterprise.soap.sforce.com SAOP header getPrefix = null SAOP header element = <ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">njRq6Ptg37ohqutyqzZdicUzejphrTZe90b6Yx3XBYtMNeGJRcxMpik7n0_TXAXxHikyGE8ui0DF16GKmkejIzteaH1xyGi1</ns1:SessionHeader>
/b]CODE for class type of org.apache.axis.message.SOAPHeaderElement from Axis 1.2RC2org.apache.axis.message.SOAPHeaderElement soapHeaderElement = array{i}; System.out.println("SAOP header element = " + soapHeaderElement.toString()); System.out.println("SAOP header getName = " + soapHeaderElement.getName()); System.out.println("SAOP header getNamespaceURI = " + soapHeaderElement.getNamespaceURI()); System.out.println("SAOP header getObjectValue = " + soapHeaderElement.getObjectValue()); System.out.println("SAOP header getPrefix = " + soapHeaderElement.getPrefix()); System.out.println("SAOP header element = " + soapHeaderElement.toString());
RESULT for class type of org.apache.axis.message.SOAPHeaderElement from Axis 1.2RC2 is:SAOP header element = <ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">X6K9mxCxCwt8VslHrxCERNHOJbcgz5NySWCriQPvp6vnupNeluKZg6fMFpj6VJCNAZMpziQrc6T7Brk1325sIjteaH1xyGi1</ns1:SessionHeader> SAOP header getName = SessionHeader SAOP header getNamespaceURI = urn:enterprise.soap.sforce.com SAOP header getObjectValue = X6K9mxCxCwt8VslHrxCERNHOJbcgz5NySWCriQPvp6vnupNeluKZg6fMFpj6VJCNAZMpziQrc6T7Brk1325sIjteaH1xyGi1 SAOP header getPrefix = null SAOP header element = <ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">X6K9mxCxCwt8VslHrxCERNHOJbcgz5NySWCriQPvp6vnupNeluKZg6fMFpj6VJCNAZMpziQrc6T7Brk1325sIjteaH1xyGi1</ns1:SessionHeader>
CODE using JbossWS isorg.apache.axis.message.SOAPHeaderElementImpl{} array = binding.getHeaders(); for (int i = 0; i < array.length; i++) { org.apache.axis.message.SOAPHeaderElementImpl soapHeaderElement = array{i} System.out.println("SAOP header element = " + soapHeaderElement.toString()); System.out.println("SAOP header getAsString = " + soapHeaderElement.getAsString()); System.out.println("SAOP header getName = " + soapHeaderElement.getName()); System.out.println("SAOP header getNamespaceURI = " + soapHeaderElement.getNamespaceURI()); System.out.println("SAOP header getObjectValue = " + soapHeaderElement.getObjectValue()); System.out.println("SAOP header getPrefix = " + soapHeaderElement.getPrefix()); System.out.println("SAOP header element = " + soapHeaderElement.toString()); }
The RESULT using JBossWS class type of
org.apache.axis.message.SOAPHeaderElementImplSAOP header element = org.apache.axis.message.SOAPHeaderElementAxisImpl@3727c5[[SessionHeader: null]] SAOP header getAsString = <ns1:SessionHeader xmlns:ns1="urn:enterprise.soap.sforce.com">HCY0lblqY8J7iTWfZvb5VALuJklpiwyZHBUlvW_pzick2FdSniwTfhLxCr4jqCGRmwjD7ZX3V5tecUgw5Q7gPDteaH1xyGi1</ns1:SessionHeader> SAOP header getName = SessionHeader SAOP header getNamespaceURI = urn:enterprise.soap.sforce.com SAOP header getObjectValue = HCY0lblqY8J7iTWfZvb5VALuJklpiwyZHBUlvW_pzick2FdSniwTfhLxCr4jqCGRmwjD7ZX3V5tecUgw5Q7gPDteaH1xyGi1 SAOP header getPrefix = null SAOP header element = org.apache.axis.message.SOAPHeaderElementAxisImpl@3727c5[[SessionHeader: null]]