Org.apache.soap.rpc.Call is hanging on invoke()...
Hi.
What do you do when you're making a call to a webservice with
org.apache.soap.rpc.Calland it just plain hangs on the Call.Invoke() method?
-pfv
Hi.
What do you do when you're making a call to a webservice with
org.apache.soap.rpc.Calland it just plain hangs on the Call.Invoke() method?
-pfv
Similar Messages
-
OK This is really weird. I have an app that runs fine in eclipse. I have deployed to using webstart but when I try to instantiate org.apache.soap.rpc.SOAPContext default constructor it fails.
All my jars are signed and I have given all permissions in the jnlp
here is the jnlp
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://cs12895.adm.bju.edu/dc" href="dc.jnlp">
<information>
<title>DC App</title>
<vendor>Bob Jones University</vendor>
<homepage href="http://www.bju.edu"/>
<description kine="one-line">The Discipline Committee Application</description>
<description kind="short">The Discipline Committee Application</description>
<icon href="imageIcon.gif"/>
<shortcut online="false">
<desktop/>
</shortcut>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+" max-heap-size="256m"/>
<jar href="dc.jar"/>
<jar href="looks-2.0.2.jar"/>
<jar href="log4j-1.2.12.jar"/>
<jar href="jdnc20060529003752.jar"/>
<jar href="hibernate3.jar"/>
<jar href="forms-1.0.7.jar"/>
<jar href="soap.jar"/>
<jar href="swingx20060529003241.jar"/>
</resources>
<application-desc main-class="edu.bju.dc.rich.LoginFrame"/>
</jnlp>Here is the code. In this cod ethe first debug messageI see but i do not see the second message. Which is how I now it is not getting constructed.
log.debug("Setting up call to auth ws");
Call call = new Call();
log.debug("Finished setting Call up");
String soapActionURI = "urn:AuthService";OK I got it working. It was not throwing an exception but when I put I try catch looking for throwables I discovered it was looking for mail.jar. So all better now :-)
-
Package org.apache.soap does not exist
Hi,
I'm trying to deploy a webservice made out of stateless session bean.
When i run the service by invoking its method through browser then I get an exception as
Servlet error: Cannot generate Class:
package org.apache.soap does not exist
import org.apache.soap.Header;
-- It seems that the oc4j is not loading soap.jar under soap/lib
But when I add soap.jar to WEB-INF/lib then I get an exception as
java.lang.LinkageError: Class org/apache/soap/rpc/SOAPContext violates loader constraints
Which means soap.jar is loaded previosuly
The required classes are present in soap.jar
Can you please help me on this
Regards
~AnilYippee... problem solved... classpath setting problem
-
Hi,
Has anyone tried to develop/deploy a web service under WSDP and invoke it from a client app written under Apache SOAP-RPC? Can this be done w/ or w/o 'axis'
from Apache-SOAP?
Thanks,
Marciayes, this can be done ...and even vice versa.
This is just a soap call and it dees not matter from where it is called.
Generate the webservice and deploy it. Use the WSDL generated to create the client with Apache Soap. Point to the end point URL for the webservice made with JAX-RPC.
I tried by creating a webservice with Apache Soap-RPC and accessing through the client made with Jax-RPC.
regards -
Exception while handling service request: org/apache/soap/Envelope
Hi all,
i´ve tried to run a message style webservice .
Now i always get following Error: Exception while handling service request: org/apache/soap/Envelope
Can anyone tell me what i should do?
I use Bea 6.1 and Apache Soap 2.2
I have deployed the Webservice and when i try to run the samples in apache all
works fine.
Thank you very much!!found the problem.
I use apache soap with tomcat 5.5.9
wrong: place the class file in a jar in the common/lib folder of tomcat
wright: place the class file in the directory webapps/soap/web-inf/classes
an other problem is when the method not exist -
Apache SOAP with websphere 6.1
I want to use Apache SOAP in websphere 6.1 since we will be reusing the framework developed already using Apache SOAP.This has been implemented only with weblogic previously.
Now we are trying to use this in combination with websphere 6.1,Is this supported?How to proceed?Hi Thierry,
When we wrote the web services layer for BEA we purposefully left out
stateful session beans and entity beans because they did not match the
"services" model and there is no standard way to keep the state between
calls to the service. I believe the Apache implementation uses the HTTP
session for this behaviour. I don't know what the problem is with the
Apache SOAP implementation but I can try and help you either 1) use a
stateless session bean to call your sfsb, or 2) convince me that stateful
beans implemented outside the web services standard is something BEA should
support.
Sam
"Thierry Janaudy" <[email protected]> wrote in message
news:[email protected]..
Hello,
I wanted to use BEA's implementation of SOAP, but the problem is that you
cannot call SFSB.
Therefore I tried to install and run Apache SOAP (Which provides a service
for SLSB, SFSB, EB).
However, you I try to remotely list the services through:
java -cp %CP% org.apache.soap.server.ServiceManagerClient
http://localhost:7001/soap/servlet/rpcrouter list
I always get
Exception in thread "main" java.lang.NoSuchMethodError
at org.apache.soap.util.xml.QName.<init>(QName.java:80)
at org.apache.soap.util.xml.QName.matches(QName.java:146)
at org.apache.soap.Envelope.unmarshall(Envelope.java:237)
at org.apache.soap.rpc.Call.invoke(Call.java:230)
at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
at
org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:1
51)
at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
37)
Do you have any idea why?
Thx -
APACHE SOAP Errors .Problem with client
Hello, i have installed a jakarta-tomcat 4.1.31 server
and added soap to it.
i 've deployed some services as taught by some tutorials
but when i try to test the service i get errors.
Exception in thread main java.lang.NoClassDefFoundError : org/apache/soap/server/ServiceManagerClient
the same error but with another file
samples/addresssbook/PutAddress
it seems to me that the client cannot access the files!
is it so?
in case you need further info please say itWhen i try to list my services i get this
\lib\soap.jar;C:\soap\jakarta-tomcat-4.1.31\common\lib\mail.jar;C:\soap\jakarta-
tomcat-4.1.31\common\lib\activation.jar
C:\soap\jakarta-tomcat-4.1.31>set CLASSPATH=C:\soap\jakarta-tomcat-4.1.31\common
\lib\soap.jar;C:\soap\jakarta-tomcat-4.1.31\common\lib\mail.jar;C:\soap\jakarta-
tomcat-4.1.31\common\lib\activation.jar;C:\soap\jakarta-tomcat-4.1.31\common\lib
\xerces.jar
C:\soap\jakarta-tomcat-4.1.31>java org.apache.soap.server.ServiceManagerClient h
ttp://localhost:8080/soap/servlet/rpcrouter list
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=No Des
erializer found to deserialize a ':return' using encoding style 'http://schemas.
xmlsoap.org/soap/encoding/'.; targetException=java.lang.IllegalArgumentException
: No Deserializer found to deserialize a ':return' using encoding style 'http://
schemas.xmlsoap.org/soap/encoding/'.]
at org.apache.soap.rpc.Call.invoke(Call.java:244)
at org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManag
erClient.java:127)
at org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient
.java:149)
at org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient
.java:235) -
Linkage Error when using Apache SOAP 2.2 with Weblogic 6.1
Has anyone seen this error before? Apparently I've got some incompatible versions of xerces being loaded. I tried putting different versions of xerces.jar in the front of my classpath, and creating an XML Registry to point to org.apache.xerces.jaxp..., but I always get the same error message.
D:\soap>java -classpath "/soap-2_2/lib/soap.jar;activation.jar;mail.jar;xerces.jar;." org.apache.soap.server.Servic
eManagerClient http://localhost:8001/App/servlet/rpcrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = loader constraints violated when linking org/xml/sax/InputSource classHas anyone seen this error before? Apparently I've got some incompatible versions of xerces being loaded. I tried putting different versions of xerces.jar in the front of my classpath, and creating an XML Registry to point to org.apache.xerces.jaxp..., but I always get the same error message.
D:\soap>java -classpath "/soap-2_2/lib/soap.jar;activation.jar;mail.jar;xerces.jar;." org.apache.soap.server.Servic
eManagerClient http://localhost:8001/App/servlet/rpcrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = loader constraints violated when linking org/xml/sax/InputSource class -
Working with the book Programming Web Services with SOAP and working on chapter 3.
Creating Web Services in Java with Apache SOAP
Wondering where do I add the Hello.java to the web server’s classpath if I am running Tomcat Server.
package samples;
public class Hello {
public String sayHello(String name) {
return "Hello " + name;
I’ve used the deployment descriptor to deploy the application on the server
<dd:service xmlns:dd="http://xml.apache.org/xml-soap/deployment" id="urn:Example1">
<dd:provider type="java"
scope="Application"
methods="sayHello">
<dd:java class="samples.Hello"
static="false" />
</dd:provider>
<dd:faultListener>
org.apache.soap.server.DOMFaultListener
</dd:faultListener>
<dd:mappings />
</dd:service>
Trying to run the client with the perl example client.
#!/usr/bin/perl -w
# hw_jclient.pl - java Hello client
use SOAP::Lite;
my $name = shift;
print "\n\nCalling the SOAP Server to say hello\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
-> uri('urn:Example1')
-> proxy('http://localhost:8080/soap/servlet/rpcrouter James')
-> sayHello($name)
-> result . "\n\n"
but getting the result of
Calling the SOAP Server to say hello
The SOAP Server says: 404 /soap/servlet/rpcrouter%20James at C:\Documents and Se
ttings\Administrator\Desktop\test.pl line 7
What am I doing wrong or not doing?
Thanks,
John Coxare you using axis or apache soap?
-
PLEASE HELP! Using Apache SOAP with WL61
Hi,
I am trying to run the Apache soap within the WL61.
I have the Apache soap servlet deployed under WL61.
I am trying to use org.apache.soap.server.ServiceManagerClient
to deploy the sample AddressBook service. I get the following error: "Unable to
resolve namespace URI for 'xsd'".
Now, the Apache SOAP faq says, I need to use the 1.3.0 xeces.jar
on both server and client to solve this problem.
However, WL61 server wont come up with the 1.3.0 xerces.jar file
I am in a catch 22 situation, please help.
thanksI had exactly this problem and by following the advice below I got it to work using
crimson.jar from apache.
Step 1: put crimson.jar frst in classpath
Step 2: put the following in config.xml
<XMLRegistry DocumentBuilderFactory="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"
Name="Xerces JAXP" SAXParserFactory="org.apache.crimson.jaxp.SAXParserFactoryImpl"
/>
Step 3: updated Server entry in config.xml to point to "Xerces JAXP" as explained
below.
I know this does not add a lot to the idea below but it is an alternative.
Thanks,
George
Manoj Cheenath <[email protected]> wrote:
>
This is something i found in apache soap mailing list:
------- Original Message --------That fixed it! Thanks, Stefan!
-----Original Message-----
From: Stefan Dube [mailto:[email protected]]
Sent: Wednesday, June 13, 2001 4:15 AM
To: [email protected]
Subject: RE: compatibility with weblogic 6.1 beta
Hi!
I believe the problem is that SOAP 2.2 uses JAXP and WL uses their
bundled
xerces as JAXP parser.
To override this you have to modify the config.xml like this: (or
use the web
console)
Add following element as child of the <Domain> element:
<XMLRegistry
DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
Name="Xerces JAXP"
SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"
/>
and modify the <Server> element like this:
<Server
InstrumentStackTraceEnabled="true"
ListenPort="80"
LogRemoteExceptionsEnabled="true"
Name="myServer"
NativeIOEnabled="true"
XMLRegistry="Xerces JAXP" <-- only this line is important
>
Hope that helps,
-sd
-----Original Message-----
From: Erik Onnen [mailto:[email protected]]
Sent: Wednesday, June 13, 2001 1:33 AM
To: '[email protected] '
Subject: RE: compatibility with weblogic 6.1 beta
The "unable to resolve namespace" problem is because BEA in
their infinite
wisdom chose to mesh Xerces into their own libraries.
Unfortunately they
used an old version and because it is so embedded, you can't
just replace a
JAR. I was able to get 2.1 working on 6.0 sp1 by moving
Xerces to the front
of the classpath in the startup script. Ed, when WL won't
start, what is the
error you get? I haven't heard of that happening before.
Steve, when you say
Xerces is in your classpath, is it at the front, before weblogic.jar?
-----Original Message-----
From: Steve Livingston
To: [email protected]
Sent: 6/12/01 6:46 PM
Subject: RE: compatibility with weblogic 6.1 beta
1) I get the same error (with NT, soap-2.2 and wl-6.1beta) andhave
found no solution:
E:\apache\soap-2_2\samples\addressbook>java
org.apache.soap.server.ServiceManagerClient
http://slivings:7001/soap/servlet/rpcrouter list
Deployed Services:
E:\apache\soap-2_2\samples\addressbook>java
org.apache.soap.server.ServiceManagerClient
http://slivings:7001/soap/servlet/rpcrouter deploy dd.xml
Ouch, the call failed:
Fault Code = SOAP-ENV:Client
Fault String = Unable to resolve namespace URI for 'ns2'.
2) My wl-6.1b will start with xerces in classpath, but same error
occurs.
Can anyone help?
Steve
-----Original Message-----
From: Ed Keen [mailto:[email protected]]
Sent: Monday, June 11, 2001 6:36 PM
To: '[email protected]'
Subject: compatibility with weblogic 6.1 beta
Has anyone gotten Apache soap version 2.2 to work with Weblogic6.1
beta?
There seems to be a xerces incompatibility. The weblogic.jarfile
contains
the xerces library. If you put xerces.jar first in the classpath,
weblogic
won't even start. However, if you put weblogic.jar first in the
classpath,
you get this error when attempting to deploy services using the
ServiceManagerClient: "Unable to resolve namespace URI for 'ns2.'"
This obviously seems to be a xerces parsing issue. Does
anyone know of
a
workaround for this?
Thanks,
EdSanjeev Hegde wrote:
Hi,
I am trying to run the Apache soap within the WL61.
I have the Apache soap servlet deployed under WL61.
I am trying to use org.apache.soap.server.ServiceManagerClient
to deploy the sample AddressBook service. I get the following error:"Unable to
resolve namespace URI for 'xsd'".
Now, the Apache SOAP faq says, I need to use the 1.3.0 xeces.jar
on both server and client to solve this problem.
However, WL61 server wont come up with the 1.3.0 xerces.jar file
I am in a catch 22 situation, please help.
thanks -
"invalid request" when calling Apache Soap 2.2 webservice using 8.1.1
I have tried setting soap-style to RPC as advised in the documentation but keep
getting this same error. Server is Apache Soap 2.2. Another test client using
Apache Soap 2.3.1 got the same error. I am trying to call a webservice in a WLI
process flow. I have generated the web service control from the wsdl. Error follows:
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=bank_so_11; Meth
od=processes.bank_so_1.GetNextAccountNumber(); Failure=com.bea.control.ServiceCo
ntrolException: SOAP-ENV:Clientinvalid request>
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=top-level; Metho
d=processes.TestWSBank_wf.$__clientRequest(); Failure=com.bea.wli.bpm.runtime.Un
handledProcessException: Unhandled process exception [ServiceException]>
<01-Oct-2003 11:04:04 o'clock EST> <Error> <WLW> <000000> <Failure=com.bea.wli.b
pm.runtime.UnhandledProcessException: Unhandled process exception [ServiceExcept
ion]>Hi Jerry,
There is not much to go on here to help solve your problem. Can you
successfully invoke the external service from Workshop's Test View? If
this works OK you might ask your question to the integration newsgroup
and see if they have some insight:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.integration
Hope this helps,
Bruce
Jerry Shea wrote:
>
I have tried setting soap-style to RPC as advised in the documentation but keep
getting this same error. Server is Apache Soap 2.2. Another test client using
Apache Soap 2.3.1 got the same error. I am trying to call a webservice in a WLI
process flow. I have generated the web service control from the wsdl. Error follows:
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=bank_so_11; Meth
od=processes.bank_so_1.GetNextAccountNumber(); Failure=com.bea.control.ServiceCo
ntrolException: SOAP-ENV:Clientinvalid request>
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=top-level; Metho
d=processes.TestWSBank_wf.$__clientRequest(); Failure=com.bea.wli.bpm.runtime.Un
handledProcessException: Unhandled process exception [ServiceException]>
<01-Oct-2003 11:04:04 o'clock EST> <Error> <WLW> <000000> <Failure=com.bea.wli.b
pm.runtime.UnhandledProcessException: Unhandled process exception [ServiceExcept
ion]> -
Trying to invoke Apache SOAP 2.3.1 RPC services
I have several legacy apache SOAP 2.3.1 RPC services I am trying to invoke using a synchronous BPEL process. The services are invoked (confirmed by tailing the log on the machine hosting the service) , however, the return value is null in all cases.
I used the snoop utility and I verified a response is indeed being returned, so I am perplexed as to why BPEL is not able to interpret the response.
Any help/ideas would be appreciated as I would prefer not to have to rewrite these services.
Thanks,
RMDid you specify the correct message type for your return variable?
<Invoke_1_Authenticate_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">
null
</part>
</Invoke_1_Authenticate_OutputVariable>
As is returns:
<ns1:AuthenticateResponse
xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
Regards,
Marc -
Synchronous BPEL process calling apache soap 2.3.1 service(s) on jboss
I have a problem that is quite frustratiing. I have a very simple synchronous BPEL process and I am trying to invoke some legacy services we have deployed using Apache soap 2.3.1 running on jboss. The process executes, the service executes, but the return value is not received by the BPEL process.
I used obtunnel to capture the data flow and everything seems fine from that perspective. The problem is, if you watch the monitor, the status says active, but the BPEL process returns immediately. It does not wait for the response, so the return value winds up being null. I have tried this numerous times with several services and the result is always the same. This is a serious problem for us. Any suggestions/insight would be very much appreciated.
Ina case there are any doubts as to whether or not it is actually a synchronous process, from the BPEL code:
<!--
Oracle JDeveloper BPEL Designer
Created: Wed Apr 18 13:19:50 EDT 2007
Author: bmurray
Purpose: Synchronous BPEL Process
-->
Below is an example from obtunnel:
==============
Listen Port: 5678
Target Host: pian.wlgore.com
Target Port: 8080
==== Request ====
POST /soap/servlet/rpcrouter HTTP/1.1
Host: pian.wlgore.com:5678
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: Oracle HTTPClient Version 10h
SOAPAction: "http://vitalstream.com/webservices/Authenticate"
Accept-Encoding: gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=UTF-8
Content-length: 829
<?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">
<env:Body>
<ns0:Authenticate xmlns:ns0="http://vitalstream.com/webservices">
<strAccount xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar3</strAccount>
<strToken xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar1</strToken>
<strReferrer xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar4</strReferrer>
<strSourceURL xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar</strSourceURL>
<strClientIP xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar2</strClientIP>
</ns0:Authenticate>
</env:Body>
</env:Envelope>==== Response ====
HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
Set-Cookie: JSESSIONID=C656EEE6B641F23F02D6E5BE79CD2A4D.ajp13w; Path=/soap
Content-Type: text/xml;charset=utf-8
Content-Length: 480
Date: Wed, 18 Apr 2007 18:34:19 GMT
Server: Apache-Coyote/1.1
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:AuthenticateResponse xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
==============
As you can see, the value is indeed returned from the service, but BPEL indicates a null value for the return:
<messages><Invoke_1_Authenticate_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strSourceURL"><strSourceURL xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar</strSourceURL>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strToken"><strToken xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar1</strToken>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strAccount"><strAccount xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar3</strAccount>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strClientIP"><strClientIP xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar2</strClientIP>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strReferrer"><strReferrer xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar4</strReferrer>
</part></Invoke_1_Authenticate_InputVariable><Invoke_1_Authenticate_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">null</part></Invoke_1_Authenticate_OutputVariable></messages>Did you specify the correct message type for your return variable?
<Invoke_1_Authenticate_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">
null
</part>
</Invoke_1_Authenticate_OutputVariable>
As is returns:
<ns1:AuthenticateResponse
xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
Regards,
Marc -
Hello everybody,
I've a problem to call a EJB form a PHP script.
There is a Apache with PHP 5.2.0 and a SAP NetWeaver Application Server 7.10 / AS Java 7.10 running on the system.
I wanted to use soap to call a method in an EJB. It's only a test EJB:
[code]
package beans;
import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService(name="HelloWorldEARBean",serviceName="HelloWorldEARBeanService",targetNamespace="http://beans/",portName="HelloWorldEARBeanPort") @Stateless public class HelloWorldEARBean {
@WebMethod public String sayHello(String testStr){
return "Hello Mr. "+testStr;
@WebMethod public String getReturn(String inputStr){
return "the return value is"+inputStr;
[/code]
I tried it with the PEAR SOAP in the following script:
[code]
<?php
require_once 'SOAP/Client.php';
$wsdl_url = 'http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean?wsdl';
$WSDL = new SOAP_WSDL($wsdl_url);
$client = $WSDL->getProxy();
$client->__trace(1);
$options=array('namespace' => 'http://beans/',
'style' => 'rpc',
'soapaction' => 'sayHello');
$NAME = "Bob";
$parameters=array(
'parameters', $NAME
$result = $client->getReturn($parameters);
echo "<pre>";
print_r($params);
echo "</pre>";
echo "<h2>return</h2>";
echo "<pre>";
print_r($result);
echo "</pre>";
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->__getlastrequest(), ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->__getlastresponse(), ENT_QUOTES). '</pre>';
?>
[/code]
The AS distributes the following WSDL:
[code]
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://beans/" xmlns:tns="http://beans/">
- <wsdl:types>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://beans/">
<xs:element name="getReturn" type="tns:getReturn" />
<xs:element name="getReturnResponse" type="tns:getReturnResponse" />
<xs:element name="sayHello" type="tns:sayHello" />
<xs:element name="sayHelloResponse" type="tns:sayHelloResponse" />
- <xs:complexType name="sayHello">
- <xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="sayHelloResponse">
- <xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="getReturn">
- <xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="getReturnResponse">
- <xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
- <wsdl:message name="sayHelloIn">
<wsdl:part name="parameters" element="tns:sayHello" />
</wsdl:message>
- <wsdl:message name="sayHelloOut">
<wsdl:part name="sayHelloResponse" element="tns:sayHelloResponse" />
</wsdl:message>
- <wsdl:message name="getReturnIn">
<wsdl:part name="parameters" element="tns:getReturn" />
</wsdl:message>
- <wsdl:message name="getReturnOut">
<wsdl:part name="getReturnResponse" element="tns:getReturnResponse" />
</wsdl:message>
- <wsdl:portType name="HelloWorldEARBean">
- <wsdl:operation name="sayHello" parameterOrder="parameters">
<wsdl:input message="tns:sayHelloIn" />
<wsdl:output message="tns:sayHelloOut" />
</wsdl:operation>
- <wsdl:operation name="getReturn" parameterOrder="parameters">
<wsdl:input message="tns:getReturnIn" />
<wsdl:output message="tns:getReturnOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HelloWorldEARBeanBinding" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" type="tns:HelloWorldEARBean">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="sayHello">
<soap:operation soapAction="" />
- <wsdl:input>
<soap:body parts="parameters" use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getReturn">
<soap:operation soapAction="" />
- <wsdl:input>
<soap:body parts="parameters" use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HelloWorldEARBeanService">
- <wsdl:port name="HelloWorldEARBeanPort" binding="tns:HelloWorldEARBeanBinding">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
[/code]
By the following output it's obvious that the AS or the EJB (webservice) doesn't receive the parameter send by the PHP script. Look at the output:
return value:
the return value is null
[code]
Request:
POST /HelloWorldEARBeanService/HelloWorldEARBean HTTP/1.0
User-Agent: PEAR-SOAP 0.8.0RC4-devel
Host: localhost
Content-Type: text/xml; charset=UTF-8
Content-Length: 438
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
<SOAP-ENV:Body>
<getReturn xmlns="http://beans/">
<item>parameters</item>
<item>Bob</item></getReturn>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
HTTP/1.1 200 OK
server: SAP NetWeaver Application Server 7.10 / AS Java 7.10
content-type: text/xml; charset=utf-8
date: Wed, 14 Feb 2007 15:51:53 GMT
connection: close
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2007-02-14T15:51:53Z</wsu:Created>
<wsu:Expires>2007-02-14T15:52:23Z</wsu:Expires></wsu:Timestamp></wsse:Security></SOAP-ENV:Header>
<SOAP-ENV:Body><ns2:getReturnResponse xmlns:ns2='http://beans/'>
<return>the return value is null</return></ns2:getReturnResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
[/code]
I used different soap interfaces for PHP like nusoap and the integrated soap interface of PHP 5.
Further I experimented with different parameters inside the function call
that results in small differencies at the xml-request.
Thanks.Hi
I've solved the problem now. I just have to add
@SOAPBinding(style=SOAPBinding.Style.RPC)
in the EJB, that's all.
Here is the complete code, ... maybe some other guys have this problem too, so I will post the working code:
At first the EJB:
package beans;
import javax.ejb.Stateless;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.soap.SOAPBinding;
import beans.HelloWorldEARBean;
@WebService(name="HelloWorldEARBean",serviceName="HelloWorldEARBeanService",targetNamespace="http://beans/",portName="HelloWorldEARBeanPort")
@SOAPBinding(style=SOAPBinding.Style.RPC)
@Stateless public class HelloWorldEARBean {
@WebMethod public String sayHello(@WebParam(name="testStr") String testStr){
return "Hello Mr. "+testStr;
2. the local XML:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://beans/" xmlns:tns="http://beans/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://beans/">
<xs:element name="sayHello" type="tns:sayHello"/>
<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
<xs:complexType name="sayHello">
<xs:element name="testStr" type="xs:string" minOccurs="0"/>
</xs:complexType>
<xs:complexType name="sayHelloResponse">
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="sayHelloIn">
<wsdl:part name="parameters" element="tns:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloOut">
<wsdl:part name="sayHelloResponse" element="tns:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorldEARBean">
<wsdl:operation name="sayHello" parameterOrder="parameters">
<wsdl:input message="tns:sayHelloIn"/>
<wsdl:output message="tns:sayHelloOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldEARBeanBinding" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" type="tns:HelloWorldEARBean">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldEARBeanService">
<wsdl:port name="HelloWorldEARBeanPort" binding="tns:HelloWorldEARBeanBinding">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
3. the PHP script:
see next post
Thank you very much for your help. -
I have a client desktop program that should connect to the server via xml-rpc and SSL. I use SecureXmlRpcClient and get the exception while execute method call:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
at org.apache.xmlrpc.XmlRpc.createTypeFactory(XmlRpc.java:238)
at org.apache.xmlrpc.XmlRpc.<init>(XmlRpc.java:193)
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.<init>(XmlRpcClientResponseProcessor.java:48)
at org.apache.xmlrpc.XmlRpcClientWorker.<init>(XmlRpcClientWorker.java:43)
at org.apache.xmlrpc.XmlRpcClient.getWorker(XmlRpcClient.java:347)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:190)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:184)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:177)
at ClientOTK.main(ClientOTK.java:48)
What does it mean and what should I do ?Hi JZ,
Did you get the answer for your problem? I am using the jars xml-rpc 2.0.1 and common-codec 1.2. I could run the http transaction successfully. But having problem with SSL. I kept getting SocketException :
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:818)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:816)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:635)
at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
I appreciate the comments to resolve this exception.
thanks jassi
Maybe you are looking for
-
So one day my front facing camera decided to just not work. I tried the restore and everything possible, it's just frozen. Luckily the other camera works. Last week, I woke in the morning and used my phone like normal and I noticed it was so hot. I l
-
Restoring my files on a new user profile
On a macbook 10 i changed the details of the user profile and it automatically upgraded the profile into yosemite mode How do I retrieve all the files I used to have?
-
How to register created fonts in Java 5?
Java 6 provides the registerFont(Font) method in GraphicsEnvironment to register fonts created using Font's createFont(int, InputStream) method. However, I need my application to work using Java 5. I looked in the Java 6 source code hoping to find th
-
Keywords search script in Bridge with subfolders
From the forums and other research I have realized if you are on a network and tag a photo, a second user can search for the keywords if all the photos are in one main folder. Yet Bridge does not work with finding keywords within subfolders. Does any
-
How to view streamed files behind Firewalls through RTSP tunneling?
Hi: According to the document of Quick Time Streaming Server Modules, there are two methods for server to send data to clients behind firewall. One is the RTSP/RTP over HTTP, and the other is RTP over RTSP. From the QuickTime player, I can issue the