You need to sign in to do that
Don't have an account?
Can I use Axis 1.1 supplied with Jboss 4.0.1??
Hi all.
I just want to know if it's possible to use Jboss's Axis 1.1 version? What are problems I can encounter using Axis 1.1 supplied with Jboss 4.0.1? Are there some known pitfalls?
Now I'm trying to compile sforce quick start example using that Axis vesrsion. I got compile error in the 'login method'.
It says the signature is unknown for the code:
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);
// for the original code also
binding.setHeader("SforceService", "SessionHeader", sh);
How can I resolve it? If I try to change it like that:
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.toString());
I'm getting 'Session Id is invalid' error. I'm sure I doing something wrong but can't get it. I tried example code using Axis 1.2RC2 library. The code compiles and runs correctly. What is wrong?
Thank you.
I'm using libraries from the folder:
\jboss-4.0.1\server\default\deploy\jboss-ws4ee.sar
JDK 1.4.2_04
Thanks
Actually I don't know it.
I'm just trying to use for example and can do it properly. So I suppose nobody can help me?
We forked the Axis code base so we could pass the TCK from Sun. You can read about the ordeal on Marc's blog here:
http://jboss.org/jbossBlog/blog/mfleury/?permalink=From+GPL+to+BSD+to+LGPL%3A+On+the+Issue+of+Business+Friendliness.html
Take care,
-Frank Merenda
I had to put the Axis libraries in my server/all/lib/ directory, though, because it conflicted with the version of Axis that was installed with JBoss. It's a hack and I need to fix it, but right now everything is working OK for me.
Hope this helps!
Take care,
-Frank
I didn't expect some answer about that problem. You've made a little clarification.
I'd like to ask it in the other way:
Does sforce.com have a 'J2EE-1.4 compliant web service example' that can be relevant to 'J2EE 1.4 ws spec'?
Thanks.
Yuriy.
Can I use approach for 'changing Axis version' in the Jboss 4.0.1 described in the post:
------------------------------------------
Axis1.2/Axis 1.1 integration with Jboss 4.0
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866172#3866172
Is it relevant to that you are talking about?
Thanks a lot.
Yuriy.
That example is a little flawed, as the person who did it commented out the RMI functionality, which is a bad thing.
I just copied my axis jar files in to my "server/XXX/lib" directory, where XXX is the server configuration you are running. Please not that this is NOT the correct way to do things, I just did this to get myself up and running, and fixing the actual issue is on my plate.
Here are links to some tutorials to get you started on compliant J2EE web services:
http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS
I am also going to be going through them in the next few weeks.
I hope this helps.
Take care,
-Frank
>>That example is a little flawed, as the person who did it commented out the RMI functionality, which is a bad thing.
Ok, now I suppose it's not my fault that 'sforce.com example' is not running with JbossWS (j2ee 1.4 compliant ws).
>>Please not that this is NOT the correct way to do things, I just did this to get myself up and running, and fixing the actual issue is on my plate.
Have you fixed your current web-services but that's not a good thing as it's not a j2ee compliant? Did I get you correctly?
If it's a case then the same I was told by the JBoss folks.
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869368
>>http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS
I saw it but JBossWS is 'not mature' yet. There are a lot of questions about using it in the JbossWS forum.
>I am also going to be going through them in the next few weeks.
I need to make sforce.com integration at minimal time. Also there are several web services for other 'vendors' already run in the project. I'm afraid I don't have a time to rewrite them all.
Thanks a lot. Now I see I'm not alone with that matter.
>>> Did I get you correctly?
That's correct.
>>> If it's a case then the same I was told by the JBoss folks.
>>> http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869368
That's also correct. Thomas is the expert in this area.
>>> I need to make sforce.com integration at minimal time.
>>> Also there are several web services for other 'vendors'
>>> already run in the project. I'm afraid I don't have a
>>> time to rewrite them all.
I just put the axis jars in "server/lib" and everything is working correctly for me. I need to clean it up so it's "correct" (i.e. I don't override all the libraries used by the app server), but right now it's working perfectly for me, and I am having no problems. I have completed a complete replacement for the "self service" portal provided by Salesforce and it's all running this way with no problems at all.
Good luck, I will talk to you soon!
Take care,
-Frank
As I've explored 'quick start' example using JBossWS version the code that sets 'SessionHeader' doesn't work for me on JBossWS.
I can login into the sforce WS, get SessionId from it but after setting it into the header of binding object it doesn't appear in it.
I use code like that:
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.getSessionId());
I'm using
sh.getSessionId()
because JBossWS doesn't have method signature like setHeader(String, String, Object)
just a
setHeader(String, String, String).
But the I check it in the header:
Object sesHeaderObject = s._getProperty("SessionHeader");
it has a NULL value.
I've used JbossWS libraries for it:
\jboss-4.0.1\server\default\deploy\jboss-ws4ee.sar\
axis-ws4ee.jar
commons-discovery.jar
commons-logging.jar
jboss-ws4ee.jar
wsdl4j.jar
As I see something wrong in the Jboss code. I'll ask it on the JbossWS forum. Let me know if someone else ecountered this problem also.
Yes pls, if it's possible. I hope it can help but I don't know it for sure.
Yuriy.
Thanks.
>I don't know of any that use that toolkit at this time.
Actually JWSDP 1.5 toolkit is used for the JbossWS as they don't have their own. So they are using it as a base tool for SEI/SI generation, etc...
Look at JbossWS Wiki pls.
http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS
Step by Step Tutorials
1. RPC style service endpoint
2. RPC style service client
3. Document style service endpoint
4. Document style service client
Today I've downloaded it and was trying to repeat steps from the both tutorials:
"Client access of an RPC style service endpoint"
http://www.jboss.org/wiki/Wiki.jsp?page=WSRPCClientStepByStep
"Client access of an Document style service endpoint"
http://www.jboss.org/wiki/Wiki.jsp?page=WSDOCClientStepByStep
Here is the article about this two RPC/Document 'styles':
"Which style of WSDL should I use?"
http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/
I was trying to generate the service endpoint interface (SEI), the service interface (SI), the Java/XML mapping descriptor (jaxrpc-mapping.xml) and possibly the complex types that are used in the SEI.
I've failed on the 'generating' it on four cases. I tried for the RPC/Document style and two WSDLs - enterprise.wsdl and partner.wsdl
I wrote 'config.xml' as described in the tutorial:
[configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"]
[wsdl location="enterprise.wsdl"
packageName="com.sforce.soap.enterprise" /]
[/configuration]
then I tried to run it from the command line (windows). I'm getting error from the 'wscompile' tool.
error: the following naming conflicts occurred: com.sforce.soap.enterprise.DescribeLayout_Type
As an example I tried Siebel's WSDL file 'opportunity.wsdl', made a config as:
[configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"]
[wsdl location="opportunity.wsdl"
packageName="com.crmondemand.siebel" /]
[/configuration]
I successfully got all sources and compiled classes for Siebel WSDL.
Can you say something about this error?
Thanks.
Java Technologies for Web Services
"Java Forums - wscompile failing to generate client library from WSDL"
http://forum.java.sun.com/thread.jspa?threadID=483890&messageID=3167592
Thanks.
Correct me if I'm wrong.
I have following code in my test. I took sforce quick_start example for it.
private void doLogin() {...
...
SoapBindingStub binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
...
LoginResult lr = binding.login(userName, pwd);
...
binding = (SoapBindingStub) new SforceServiceLocator().getSoap(new URL(lr.getServerUrl()));
...
_SessionHeader sh = new _SessionHeader();
sh.setSessionId(lr.getSessionId());
/*** Following statement is different for different used libray versions ***/
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);
}
Everything works fine with standalone Axis 1.2 RC2 library.
Also it has 'required' method signature:
org.apache.axis.client.Stub.setHeader(String namespace, String partName, Object headerValue);
or
setHeader(SOAPHeaderElement header);
When I try use Jboss lib I have methods with signatures:
org.apache.axis.client.Stub.setHeader(String namespace, String partName, String headerValue);
or
setHeader(SOAPHeaderElementAxisImpl header)
So I changed code like that:
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh.getSessionId());
>> sh.getSessionId()
assuming it will work, but...
The problem happens when I try to make subsequent WS calls. I'm getting 'Invalid Session ID found in SessionHeader'.
I've tried to use already generated stubs from the 'sforce-jsp-samples.war' it didn't help me. Result is exactly the same using both libs. Axis1.2 works, Jboss doesn't.
I think the problem with Jboss usage is passing 'org.apache.axis.message.SOAPHeaderElement'
I made some explorations and posted them as question. You can find them on the Jboss forum.
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=60925
I tried code for getting SOAP header elements something like that:
--------
org.apache.axis.message.SOAPHeaderElement[] array = binding.getHeaders();
for (int i = 0; i < array.length; i++) {
org.apache.axis.message.SOAPHeaderElement soapHeaderElement = array[i];
System.out.println("SAOP header element = " + soapHeaderElement.toString());
.........
}
---------
result in the console is different for libs:
It's 'correct' using Axis 1.2RC2.
//javax.xml.soap.SOAPHeaderElement
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]
///org.apache.axis.message.SOAPHeaderElement
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]
The Jboss code version makes 'incorrect element':
// org.apache.axis.message.SOAPHeaderElementAxisImpl
SAOP header element = org.apache.axis.message.SOAPHeaderElementAxisImpl@3727c5[[SessionHeader: null
or
SAOP header getAsString =
[ns1:SessionHeader xmlns:ns1="urn:enterprise.soap.sforce.com"]HCY0lblqY8J7iTWfZvb5VALuJklpiwyZHBUlvW_pzick2FdSniwTfhLxCr4jqCGRmwjD7ZX3V5tecUgw5Q7gPDteaH1xyGi1[/ns1:SessionHeader]
although Jboss's header STILL HAS 'some correct data' in it:
SAOP header getNamespaceURI = urn:enterprise.soap.sforce.com
SAOP header getObjectValue = HCY0lblqY8J7iTWfZvb5VALuJklpiwyZHBUlvW_pzick2FdSniwTfhLxCr4jqCGRmwjD7ZX3V5tecUgw5Q7gPDteaH1xyGi1
Thanks.