Invoke Service using SAAJ Client
Hi,
I trying to create a SAAJ client to invoke a web service which is already deployed. I am facing some difficulties in constructing the SOAP xml to invoke a method which is deployed. I am using AXIS 1.4 & TomCat 4.1.3.
For example:
I have a method validateIPAddress( String ) which is deployed in the server.
public String validateIP(String ipAddress)
if ( ipAddress.trim().length() > 0 )
return "S100";
else
return "E100";
To invoke the above method i wanted to create a SAAJ client. Kindly help me how to construct the SOAP request.
Thanks in Advance.
You say above:
"When I test the service, it defaults to client 800 for authorization."
Are you testing the service via SICF directly?
To test from SICF
Goto: transaction /nsicf > default host ->
sap -> bc -> gui -> sap -> its -> my_service
o Select Test service from context menu of the service node
i.e: Right Click -> Test Service
This will launch the webgui service in the browser - from here logon
to system again. From the OKFilecode type /n(transaction name)
What are the GUI Configuration settings of the service?
Goto: transaction /nsicf > default host ->
sap -> bc -> gui -> sap -> its -> my_service
Double click on "my_service"
Tab: Service Data -> Button: GUI Configuration
Where have you the client information specified for the service in SICF?
What is the default client value under the "System Logon Settings"?
Goto: Tab: Error Pages -> Tab: Logon Errors -> System Logon: Click the "Configuation Button"
Similar Messages
-
Exception while invoking webservices using Dynamic client without WSDL
Hi All,
I am getting the below exception while invoking webservices using Dynamic client without WSDL.
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
Exception in thread "main"
Please find my source file below....
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
public class TestWSWithoutWSDL {
public static void main(String[] args) {
try{
String address = "<WSDL's SOAP Address>";
String namespaceURI = "<namespaceURI>";
String serviceName = "<serviceName>";
String portName = "<portName>";
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String agencyID = "AGN00533";
String fileName = "testWS";
String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
* Create an instance of the Service with the given service QName
Service service = factory.createService(new QName(serviceName));
Call call = service.createCall(new QName(portName));
call.setTargetEndpointAddress(address);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
* Set operation name to invoke.
call.setOperationName(new QName(namespaceURI,"<operationName>"));
* Add parameters definitions in the call object.
call.addParameter("string", stringQName, String.class, ParameterMode.IN);
call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
* Set definition of the return type.
call.setReturnType(stringQName);
Object[] inParams = new Object[3];
inParams[0] = new String(agencyID);
inParams[1] = new String(fileName);
inParams[2] = new String(xmlString);
String result = ((String)call.invoke(inParams)).toString();
System.out.println(result);
}catch (Exception e){
e.printStackTrace();
Please give your suggestions for the above said exception....
Thanks & Regards....Hi All,
I am getting the below exception while invoking webservices using Dynamic client without WSDL.
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
Exception in thread "main"
Please find my source file below....
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
public class TestWSWithoutWSDL {
public static void main(String[] args) {
try{
String address = "<WSDL's SOAP Address>";
String namespaceURI = "<namespaceURI>";
String serviceName = "<serviceName>";
String portName = "<portName>";
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String agencyID = "AGN00533";
String fileName = "testWS";
String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
* Create an instance of the Service with the given service QName
Service service = factory.createService(new QName(serviceName));
Call call = service.createCall(new QName(portName));
call.setTargetEndpointAddress(address);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
* Set operation name to invoke.
call.setOperationName(new QName(namespaceURI,"<operationName>"));
* Add parameters definitions in the call object.
call.addParameter("string", stringQName, String.class, ParameterMode.IN);
call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
* Set definition of the return type.
call.setReturnType(stringQName);
Object[] inParams = new Object[3];
inParams[0] = new String(agencyID);
inParams[1] = new String(fileName);
inParams[2] = new String(xmlString);
String result = ((String)call.invoke(inParams)).toString();
System.out.println(result);
}catch (Exception e){
e.printStackTrace();
Please give your suggestions for the above said exception....
Thanks & Regards.... -
Authenticating to weblogic web service using a client cert with webserver
I am trying to think of how to authenticate a client to a weblogic web service
using a client certificate. The wrinkle is that a Web Server (iis or whatever)
will be handling the ssl part and forwarding non-secure to weblogic. The cert
will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
At this point it is not clear to me what I can do. When does CertAuthenticator
get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
class?
Any help will be appreciated, even explaining why it can't be done.
Thanks,
ScottI am trying to think of how to authenticate a client to a weblogic web service
using a client certificate. The wrinkle is that a Web Server (iis or whatever)
will be handling the ssl part and forwarding non-secure to weblogic. The cert
will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
At this point it is not clear to me what I can do. When does CertAuthenticator
get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
class?
Any help will be appreciated, even explaining why it can't be done.
Thanks,
Scott -
Calling BPEL service using axis client
Hi,
I have created and deployed simple BPEL process and i am trying to invoke this BPEL process using axis client.
deployed BPEL wsdl is as follows
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="SimpleProcess" targetNamespace="http://xmlns.oracle.com/SimpleProcess" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/SimpleProcess" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/SimpleProcess">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/SimpleProcess" schemaLocation="SimpleProcess.xsd" />
</schema>
</types>
- <message name="SimpleProcessRequestMessage">
<part name="payload" element="tns:SimpleProcessProcessRequest" />
</message>
- <message name="SimpleProcessResponseMessage">
<part name="payload" element="tns:SimpleProcessProcessResponse" />
</message>
- <portType name="SimpleProcess">
- <operation name="process">
<input message="tns:SimpleProcessRequestMessage" />
<output message="tns:SimpleProcessResponseMessage" />
</operation>
</portType>
- <binding name="SimpleProcessBinding" type="tns:SimpleProcess">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="process">
<soap:operation style="document" soapAction="process" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="SimpleProcess">
- <port name="SimpleProcessPort" binding="tns:SimpleProcessBinding">
<soap:address location="http://localhost:9700/orabpel/default/SimpleProcess/1.0" />
</port>
</service>
- <plnk:partnerLinkType name="SimpleProcess">
- <plnk:role name="SimpleProcessProvider">
<plnk:portType name="tns:SimpleProcess" />
</plnk:role>
</plnk:partnerLinkType>
</definitions>
and my soap client code is as follows
public static void main(String[] args) throws Exception {
String endpoint =
"http://ICON-OBCC.asiapacific.hpqcorp.net:9700/orabpel/default/SimpleProcess/1.0 ";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://xmlns.oracle.com/TP", "process"));
String ret = (String) call.invoke( new Object[] { "FFF" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
when i execute this i am getting follwoing error on BPEL console
Error - OWS-04005 an error occured for port BPEL_OC4j_SOAP_PROVIDER javx.xml.rpc.JAXRPCException java:lang:NullPointerException
Any indication for resolving this will be great help.
Thanks in advance
SHi,
I have created and deployed simple BPEL process and i am trying to invoke this BPEL process using axis client.
deployed BPEL wsdl is as follows
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="SimpleProcess" targetNamespace="http://xmlns.oracle.com/SimpleProcess" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/SimpleProcess" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/SimpleProcess">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/SimpleProcess" schemaLocation="SimpleProcess.xsd" />
</schema>
</types>
- <message name="SimpleProcessRequestMessage">
<part name="payload" element="tns:SimpleProcessProcessRequest" />
</message>
- <message name="SimpleProcessResponseMessage">
<part name="payload" element="tns:SimpleProcessProcessResponse" />
</message>
- <portType name="SimpleProcess">
- <operation name="process">
<input message="tns:SimpleProcessRequestMessage" />
<output message="tns:SimpleProcessResponseMessage" />
</operation>
</portType>
- <binding name="SimpleProcessBinding" type="tns:SimpleProcess">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="process">
<soap:operation style="document" soapAction="process" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="SimpleProcess">
- <port name="SimpleProcessPort" binding="tns:SimpleProcessBinding">
<soap:address location="http://localhost:9700/orabpel/default/SimpleProcess/1.0" />
</port>
</service>
- <plnk:partnerLinkType name="SimpleProcess">
- <plnk:role name="SimpleProcessProvider">
<plnk:portType name="tns:SimpleProcess" />
</plnk:role>
</plnk:partnerLinkType>
</definitions>
and my soap client code is as follows
public static void main(String[] args) throws Exception {
String endpoint =
"http://ICON-OBCC.asiapacific.hpqcorp.net:9700/orabpel/default/SimpleProcess/1.0 ";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://xmlns.oracle.com/TP", "process"));
String ret = (String) call.invoke( new Object[] { "FFF" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
when i execute this i am getting follwoing error on BPEL console
Error - OWS-04005 an error occured for port BPEL_OC4j_SOAP_PROVIDER javx.xml.rpc.JAXRPCException java:lang:NullPointerException
Any indication for resolving this will be great help.
Thanks in advance
S -
How to Serialize/Deserialize Beans with Web Services using DII client
Dear All;
I had developed a web serivce by Oracle JDeveloper [J2EE 1.4 (JAX-RPC)] and trying to invoke methods within through DII client using Apache Axis 1.
The Beans I am using are structured as follows:
public class InBean {
public InBean() {
private int x;
private float y;
public setters/getters for x
public setters/getters for y
public class OutBean {
public OutBean() {
private String inString;
private String outString;
public setters/getters for inString
public setters/getters for outString
The (InBean) is used as method input and the (OutBean) is used as method output.
The problems I am facing are as follows:
[1] How to serialize/desrialize the Beans as they are not registered with Apache Axis 1?
[2] How to invoke the Beans using Dynamic client DII and not classic proxy and Stubs?
[3] How to create the Beans using WSD2Java of the Apache Axis 1 ?
In case you have any helping URL's, Book names or sample code, please attach as they will be very helpful.
Thanks alot for the help.-----
Best Regards,
Ahmed M. AbbasYou will find some working code at :
http://ksoap.objectweb.org/software/downloads/index.html
It's code that use kSOAP and kXML implementations ....
If you will also find some useful information here :
http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
http://www-106.ibm.com/developerworks/wireless/library/wi-jsr/
http://www-106.ibm.com/developerworks/wireless/library/wi-xmlparse/
Regards. -
Web services using OIM Client API.
Hi All,
decided to try out some webservices talking to OIM via the client api. have a few questions.
is it better if the webservice app server and the OIM ejb app server are the same? i.e. weblogic.
I noticed in some of the code that configurationclient is using "web-client" rather than "Discovery.Coreserver" as the first param. what's the difference?
Im currently using tomcat5 and java5 with xfire. and I think tomcat is not liking the weblogic jar. I could swap out the app server but would like to keep using java5 and xfire if that's possible.
curious to hear abut other setups.
Thanx.
FredI have a couple of clients using web services to expose OIM APIs. The most common approaches is to either use Apache Axis or the web service module in Websphere.
Perhaps you should try migrating to Apache Axis if your application server doesn't like the Weblogic jars?
I personally like Axis but that is mostly because I have used Axis a couple of times.
Best regards
/M -
How to pass in complex data to a web service using dynamic client
I wrote to dynamic client to access the complex example in weblogic 7.000, I would
like to know how I passed in a complex type to a dynamic client.An example of using dynamic client is attached:
regards,
-manoj
"fkeita" <[email protected]> wrote in message
news:3d051775$[email protected]..
>
I wrote to dynamic client to access the complex example in weblogic 7.000,I would
like to know how I passed in a complex type to a dynamic client.[call4.jar] -
How to Invoke service using HTTP POST in BPEL?
I have a client using .net service with a web page http://.../httpreceive.aspx which is invoke through an http post. How can we post xml message using http post to the url in BPEL. Are there any documentation on doing this? Will this require writing a java class to do an http post the xml message to the url?
Edited by: sns724 on Feb 12, 2009 11:56 AMI created a wsdl with the http-binding to do a HTTP Post and I'm getting a com.collaxa.cube.ws.wsif.providers.http.WSIFOperation_HTTP@1ac9964 : Could not invoke 'process'; nested exception is: java.lang.NullPointerException.
Here's my wsdl with the binding:
<definitions name="TestHTTPost" targetNamespace="http://test.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://test.com"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://hyphen.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="AddressBookEntry">
<complexType>
<sequence>
<element name="AddressBookNumber" type="string"/>
<element name="Name" type="string"/>
<element name="AddressLine1" type="string"/>
<element name="AddressLine2" type="string"/>
<element name="City" type="string"/>
<element name="State" type="string"/>
<element name="PostalCode" type="string"/>
<element name="Phone" type="string"/>
<element name="Fax" type="string"/>
<element name="Email" type="string"/>
<element name="ElectDest" type="string"/>
</sequence>
</complexType>
</element>
<element name="PostMessageResult">
<complexType>
<sequence>
<element name="Result" type="string"/>
<element name="Errors">
<complexType>
<sequence>
<element name="Error">
<complexType>
<sequence>
<element name="ErrorDescription" type="string"/>
<element name="ErrorSource" type="string"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="HTTPPostServiceRequestMessage">
<part name="payload" element="tns:AddressBookEntry"/>
</message>
<message name="HTTPPostServiceResponseMessage">
<part name="payload" element="tns:PostMessageResult"/>
</message>
<portType name="HTTPPostService">
<operation name="process">
<input message="tns:HTTPPostServiceRequestMessage" />
<output message="tns:HTTPPostServiceResponseMessage"/>
</operation>
</portType>
<binding name="HTTPPost" type="tns:HTTPPostService">
<http:binding verb="POST"/>
<operation name="process">
<http:operation location="/httpreceive.aspx"/>
<input>
<mime:mimeXml part="payload"/>
<mime:content type="text/xml"/>
</input>
<output>
<mime:mimeXml part="payload"/>
<mime:content type="text/xml"/>
</output>
</operation>
</binding>
<service name="HTTPPostService">
<port name="HTTPPost" binding="tns:HTTPPost">
<http:address location="https://testxml.solutions.com"/>
</port>
</service>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARTNER LINK TYPE DEFINITION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<plnk:partnerLinkType name="HTTPPostService">
<plnk:role name="HTTPPostServiceProvider">
<plnk:portType name="tns:HTTPPostService"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions> -
Failure to create Web Service using Java client
Attempting to create a WebService using a Java client (partial code follows):
String xml = "<custId xmlns=\"http://samples.otn.com\">" + 101 + "</name>";
//Context ic = new InitialContext();
Locator lctr = new Locator("default", "bpel");
IDeliveryService dservice = (IDeliveryService)lctr.lookupService(IDeliveryService.SERVICE_NAME);
NormalizedMessage nm = new NormalizedMessage();
nm.addPart("payload", xml);
However - get the following error message:
E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
Exception in thread "main" Process exited with exit code 1.
The line: Locator lctr = new Locator("default", "bpel");
is the point of the error -
What is the problem here. I have seen several similar issues on the forum but I have not foound one that iindicated a solution to the problem.
THANKS - Ken CooperApplied the suggested code and am getting following errors:
E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:216)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
Caused by: java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
... 8 more
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
Error occurs at the bold line below - same location as before:
Properties props = new Properties();
props.setProperty("orabpel.platform", "oc4j_10g");
props.setProperty("java.naming.factory.initial",
"com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url", "ormi://localhost/orabpel");
props.setProperty("java.naming.security.principal", "admin");
props.setProperty("java.naming.security.credentials", "welcome");
props.setProperty("dedicated.rmicontext", "true");
Locator lctr = new Locator("default", "oracle", props);
Thanks - Ken -
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 -
Calling Web Service from EJB using HTTP Client
Hi,
Scenario:
I need to Call a Web Service from an EJB Application.I used HttpClient for calling the Web Service in the EJB Application. When i call the execute method of the HttpCLient it throws an exception
The element type "META" must be terminated by the matching end-tag "</META>"
The input XML does not have a node called META.
When i call the Web Service using Http Client form an Java Application it is working fine.
Kindly Suggest me the changes/steps that needs to be done
Regards,
S.V.Satish KumarHi Manish,
SOAP adapter does pass the message to XI (this message contains SOAP envelope although XI expects to get message without it), and during the mapping step i get "Runtime Exception in Message-Mapping transformatio~".
I suppose it's because i created proxy manually. I did so because when i imported WSDL, and tried to generate proxy in CRM, i got an error message that said that proxy couldn't be generated because external definitions are only allowed in XI 3. But my XI version is 3.0! And when I generate the same proxy in my R/3 system that is installed on WAS 640, it works.
What can I do?
Cheers,
Anya. -
Unable to call the service using JAX-RPC
Hi,
I created a web service in Weblogic6.1 using the ant wsgen utility.
When i tried to invoke the service using my client program, i get the following error.
Exception in thread "main" modeler error: model error: invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema"
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:137)
at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
at JAXRPCClient.main(JAXRPCClient.java:20)
CAUSE:
model error: invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema")
at com.sun.xml.rpc.processor.schema.InternalSchemaBuilder.buildTypeDefinition(InternalSchemaBuilder.java:61)
at com.sun.xml.rpc.processor.schema.InternalSchema.findTypeDefinition(InternalSchema.java:45)
at com.sun.xml.rpc.processor.modeler.wsdl.SchemaAnalyzer.schemaTypeToSOAPType(SchemaAnalyzer.java:66)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperationRPCStyle(WSDLModeler.java:592)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperation(WSDLModeler.java:423)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:344)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:231)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:196)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:103)
at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
at JAXRPCClient.main(JAXRPCClient.java:20)
CAUSE:
invalid entity name: "string" (in namespace: "http://www.w3.org/1999/XMLSchema")
at com.sun.xml.rpc.wsdl.framework.AbstractDocument.find(AbstractDocument.java:110)
at com.sun.xml.rpc.processor.schema.InternalSchemaBuilder.buildTypeDefinition(InternalSchemaBuilder.java:54)
at com.sun.xml.rpc.processor.schema.InternalSchema.findTypeDefinition(InternalSchema.java:45)
at com.sun.xml.rpc.processor.modeler.wsdl.SchemaAnalyzer.schemaTypeToSOAPType(SchemaAnalyzer.java:66)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperationRPCStyle(WSDLModeler.java:592)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processSOAPOperation(WSDLModeler.java:423)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:344)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:231)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:196)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:103)
at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:44)
at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
at JAXRPCClient.main(JAXRPCClient.java:20)
My wsdl file is
- <definitions targetNamespace="java:com.mountain.molehill.ejb.controller" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:tns="java:com.mountain.molehill.ejb.controller" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- <types>
<schema targetNamespace="java:com.mountain.molehill.ejb.controller" xmlns="http://www.w3.org/1999/XMLSchema" />
</types>
- <message name="getPointBalanceRequest">
<part name="arg0" type="xsd:string" />
</message>
- <message name="getPointBalanceResponse">
<part name="return" type="xsd:string" />
</message>
- <portType name="WSManagerPortType">
- <operation name="getPointBalance">
<input message="tns:getPointBalanceRequest" />
<output message="tns:getPointBalanceResponse" />
</operation>
</portType>
- <binding name="WSManagerBinding" type="tns:WSManagerPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="getPointBalance">
<soap:operation soapAction="urn:getPointBalance" />
- <input>
<soap:body use="encoded" namespace="urn:WSManager" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
- <output>
<soap:body use="encoded" namespace="urn:WSManager" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
- <service name="WSManager">
<documentation>todo</documentation>
- <port name="WSManagerPort" binding="tns:WSManagerBinding">
<soap:address location="http://blrkec17805:7001/WS/rpc_URI" />
</port>
</service>
</definitions>
Could anybody help me in resolving this problem?
Thanks in advance,
RajaduraiHello,
edit the wsdl file and change 'http://www.w3.org/1999/XMLSchema' to 'http://www.w3.org/2001/XMLSchema' for both xmlns:xsd and xmlns then try again.
Andre -
SSL Error while Consuming Java build SOAP services using Dotnet Console App
Hi, I want to consume a SOAP service developed in JAVA. I don't have any control on Service side. I have to just consume the SOAP service using my client Application which is in DotNet Console Application using C#. Here is the detail about the service:
1. The service has SSL configured.
2. End point looks like: https://xyz.com:443
3. I am able to connect the service using SOAP UI Tool by configuring the Tool with the certs given by Java developer.
4. Basically there are two certs used, one for "client authentication" purpose and the second cert is for "WS security" purpose.
5. When i add the WSDL to my client app as a service Reference, the generated App.config file looks as shown below:
<configuration>
system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Hello_HTTPBinding">
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/" binding="basicHttpBinding"
bindingConfiguration="Hello_HTTPBinding"
contract="Proxy_Hello" name="Hello_HTTPPort" />
</client>
</system.serviceModel>
</configuration>
6. Basically I need to pass two certs, one cert used for "client authentication" purpose and the second cert is used for "WS security purpose".
7. I have changed the above client configuration as below marked in RED color text:
<configuration>
system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Hello_HTTPBinding">
<security mode="TransportWithMessageCredential" >
<transport clientCredentialType="Certificate" proxyCredentialType="Basic" realm="" />
<message clientCredentialType="Certificate" algorithmSuite="Basic128" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://xyz.com:443"
binding="basicHttpBinding"
bindingConfiguration="Hello_HTTPBinding"
contract="Proxy_Hello" name="Hello_HTTPPort" behaviorConfiguration="NewBehavior"/>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="NewBehavior">
<clientCredentials >
<clientCertificate findValue="clientxyz.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
<serviceCertificate>
<defaultCertificate findValue="helloabc.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName"/>
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
8. I am assuming the cert required for WS security will be passed using in<serviceCertificate> element, but not fully sure....correct me if I am wrong.
9. By creating proxy object of the service when I am trying to call the required method I am getting this Error: "Could not establish
secure channel for SSL/TLS with authority "******xyz.com."
10. Its working perfect in SOAP UI Tool, generating the Raw XML as shown below in ORANGE color Text:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:gw-headers-100" xmlns:urn1="urn:gw-util-100">
<soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="X509-35309F239B754D9BA414230227616161">
aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbccccccccccccccccccccc********dddddddddddd*****eeeeeeeeee
</wsse:BinarySecurityToken>
<ds:Signature Id="SIG-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="soapenv urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-1">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>
abcabcabcabc******gggggg
</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>gggggg888******8sdsdsdss</ds:SignatureValue>
<ds:KeyInfo Id="KI-38488AAAA222">
<wsse:SecurityTokenReference wsu:Id="STR-ggggjj57557575">
<wsse:Reference URI="#X509-74747477" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
<soapenv:Body wsu:Id="id-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<urn1:xxxxxxx>
</urn1:xxxxxx>
</soapenv:Body>
</soapenv:Envelope>
11. Using Dotnet Tracing I am able to see the Request XML generated from the console Application as shown below in BLUE color text: But getting the SSL error as: Could not establish secure channel
for SSL/TLS with authority "******xyz.com.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<u:Created>2015-02-04T04:19:29.825Z</u:Created>
<u:Expires>2015-02-04T04:24:29.825Z</u:Expires>
</u:Timestamp>
<o:BinarySecurityToken>
<!-- Removed-->
</o:BinarySecurityToken>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
<DigestValue>aaaaaa****dddddd=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>ssssddddd888fffff****=</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-93e09c54-aee8-4f45-a8a4-d63d8a2d63fb-1"></o:Reference>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
</s:Envelope>
12. I want to Generate the Request XML from my Dotnet console Application simiar to the SOAP UI generated XML(refer #10).. Also want to get rid of SSL error....Appreciate your Suggestion..Hi tksdotnet,
This forum is used to discuss the questions about the WCF web service, for java web services questions, it will be better to post in this forum:
#WCF, ASMX and other Web Services:
http://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services .
Thanks for your understanding.
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Web Service Client, BindException, Address already in use, saaj.SOAPExcepti
Hello,
Am caught up with an error and i can't get past it, need some help here.
My application is a batch processing web service client, reads some input rows, sends web service requets, processes the responses and logs it.
The application runs well in normal mode, but under load(more thread count), I get this wierd error and I can't make it go away.
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
I have properly closed the connections after each web service calls, but it still says Address in use. Please refer below for the complete stack trace and a piece of the code. Am using SAAJ and JWSDP and am not using AXIS api. I have searched the web but couldn't find any solutions.
This is not an error that server is not closing connections properly as I was able to test with SOAPUI and LoadRunner with even higher threads and it ran without problems. SOAPUI and LoadRunner scripts were executed from the same client machine as my application uses. Please help.
For each inputrow
SOAPConnection connection = null;
try
SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
connection = soapConnFactory.createConnection();
SOAPMessage request = getRequest(inputRow);
SOAPMessage response = connection.call(request, "http://<<server>>:<<port no>>/Domain/Services/Mgmt");
finally
if (connection != null)
connection.close();
}catch(SOAPException se){
System.out.println("Error while closing connection. " + se.getMessage());
connection = null;
} // End of for loop
Stack Trace:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:121)
at ClientImpl.getResponse(ClientImpl.java:440)
at input.InputSampler$MyCallable.call(Sampler.java:63)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:325)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:150)
... 12 more
Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown S
ource)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:282)
Is there something like connection pooling for web services, is that the answer to this issue, if yes, please let me know where i should start.
Thanks
DevMove server socket creation out of while loop. You don't need to create new server socket every time.
-
Problem in invoking a secure weblogic web service from javaws client
Hi all,
the situation is this: there is a secure web service (Wssp1.2-2007-Wss1.1-X509-Basic256.xml policy) which is accessed by a stand-alone remote web service client (swing-enabled) which is initiated via java web start. You'll probably wondering why this is a special case. Let me elaborate...
The first step was to develop the service and the client. This wasn't much of a trouble, since the documentation was very good apart from creating a ClientBSTCredentialProvider object at the client side. The documentation should explicitly state that the sixth argument, that of the server certificate, is required! In any case, the first step was a success and the invocation was encrypted and signed at the message level.
The second step was to create a stand-alone remote client, without any local weblogic installation. That was a bit of a problem, since wlfullclient.jar or wseeclient.jar or weblogic.jar were not enough. I should note that the client was created via netbeans 7.0 and not with the help of weblogic clientgen. So, I had to make a verbose run from netbeans, in order to enumerate the jars which are accessed and gather them into the same directory. That was OK too. The standalone client works just fine.
The third step is to simply (not so simply...) make a java web start version of the client. Since the previous step was a success (having all necessary jars in the same directory) this one should not be a problem. Well... that turned out to be a huge issue. What I get back as the error message (shown in the java web start console) is this:
java.lang.InternalError: error initializing kernel caused by: java.lang.AssertionError: Duplicate initialization of WorkManager
at weblogic.work.WorkManagerFactory.set(WorkManagerFactory.java:107)
at weblogic.work.ExecuteQueueFactory.initialize(ExecuteQueueFactory.java:23)
at weblogic.kernel.Kernel.initialize(Kernel.java:103)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:64)
at weblogic.rjvm.wls.WLSRJVMEnvironment.ensureInitialized(WLSRJVMEnvironment.java:50)
at weblogic.protocol.ProtocolManager$DefaultAdminProtocolMaker.<clinit>(ProtocolManager.java:53)
at weblogic.protocol.ProtocolManager.getDefaultAdminProtocol(ProtocolManager.java:218)
at weblogic.protocol.ProtocolHandlerAdmin.<clinit>(ProtocolHandlerAdmin.java:23)
at weblogic.rjvm.wls.WLSRJVMEnvironment.registerRJVMProtocols(WLSRJVMEnvironment.java:120)
at weblogic.rjvm.RJVMManager.ensureInitialized(RJVMManager.java:87)
at weblogic.rjvm.RJVMManager.<clinit>(RJVMManager.java:46)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:97)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:28)
at weblogic.rjvm.LocalRJVM$LocalRJVMMaker.<clinit>(LocalRJVM.java:31)
at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:72)
at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:403)
at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:395)
at weblogic.xml.crypto.utils.DOMUtils.assignId(DOMUtils.java:374)
at weblogic.xml.crypto.wss.SecurityBuilderImpl.assignUri(SecurityBuilderImpl.java:148)
at weblogic.wsee.security.policy.SigningReferencesFactory.getSigningReferences(SigningReferencesFactory.java:100)
at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:446)
at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:335)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:574)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:428)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.constructMessage(SecurityMessageArchitect.java:304)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:138)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:121)
at weblogic.wsee.security.wss.SecurityPolicyArchitect.processOutbound(SecurityPolicyArchitect.java:225)
at weblogic.wsee.security.wss.SecurityPolicyArchitect.processMessagePolicy(SecurityPolicyArchitect.java:123)
at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:119)
at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:91)
at weblogic.wsee.security.wssp.handlers.WssClientHandler.processOutbound(WssClientHandler.java:117)
at weblogic.wsee.security.wssp.handlers.WssClientHandler.processRequest(WssClientHandler.java:69)
at weblogic.wsee.security.wssp.handlers.WssHandler.handleRequest(WssHandler.java:112)
at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
at com.sun.xml.ws.client.Stub.process(Stub.java:272)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at $Proxy29.fetchCSD(Unknown Source)
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:597)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at $Proxy30.fetchCSD(Unknown Source)
at exchangecsdclient.CSDExchangeClientImpl.fetchCSD(CSDExchangeClientImpl.java:151)
at pdfutil.PDFUtilApp.initialize(PDFUtilApp.java:55)
at org.jdesktop.application.Application$1.run(Application.java:170)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:66)
at weblogic.rjvm.wls.WLSRJVMEnvironment.ensureInitialized(WLSRJVMEnvironment.java:50)
at weblogic.protocol.ProtocolManager$DefaultAdminProtocolMaker.<clinit>(ProtocolManager.java:53)
at weblogic.protocol.ProtocolManager.getDefaultAdminProtocol(ProtocolManager.java:218)
at weblogic.protocol.ProtocolHandlerAdmin.<clinit>(ProtocolHandlerAdmin.java:23)
at weblogic.rjvm.wls.WLSRJVMEnvironment.registerRJVMProtocols(WLSRJVMEnvironment.java:120)
at weblogic.rjvm.RJVMManager.ensureInitialized(RJVMManager.java:87)
at weblogic.rjvm.RJVMManager.<clinit>(RJVMManager.java:46)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:97)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:28)
at weblogic.rjvm.LocalRJVM$LocalRJVMMaker.<clinit>(LocalRJVM.java:31)
at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:72)
at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:403)
at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:395)
at weblogic.xml.crypto.utils.DOMUtils.assignId(DOMUtils.java:374)
at weblogic.xml.crypto.wss.SecurityBuilderImpl.assignUri(SecurityBuilderImpl.java:148)
at weblogic.wsee.security.policy.SigningReferencesFactory.getSigningReferences(SigningReferencesFactory.java:100)
at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:446)
at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:335)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:574)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:428)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.constructMessage(SecurityMessageArchitect.java:304)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:138)
at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:121)
at weblogic.wsee.security.wss.SecurityPolicyArchitect.processOutbound(SecurityPolicyArchitect.java:225)
at weblogic.wsee.security.wss.SecurityPolicyArchitect.processMessagePolicy(SecurityPolicyArchitect.java:123)
at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:119)
at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:91)
at weblogic.wsee.security.wssp.handlers.WssClientHandler.processOutbound(WssClientHandler.java:117)
at weblogic.wsee.security.wssp.handlers.WssClientHandler.processRequest(WssClientHandler.java:69)
at weblogic.wsee.security.wssp.handlers.WssHandler.handleRequest(WssHandler.java:112)
at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
at com.sun.xml.ws.client.Stub.process(Stub.java:272)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at $Proxy29.fetchCSD(Unknown Source)
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:597)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at $Proxy30.fetchCSD(Unknown Source)
at exchangecsdclient.CSDExchangeClientImpl.fetchCSD(CSDExchangeClientImpl.java:151)
at pdfutil.PDFUtilApp.initialize(PDFUtilApp.java:55)
at org.jdesktop.application.Application$1.run(Application.java:170)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
The two invocations (one using java and the other using javaws) should obviously have not differences at all since all resources (jars) are the same.
I have tried all client jar combinations (with wlfullclient.jar, wseeclient.jar, weblogic.jar) and the result is the same. One additional piece of information is that when removing all security parameters (message level encryption and signing) from the web service the java web start client works just fine!!!
This is not an issue of additional jars that somehow mess with weblogic jars, since the same error occurs even in the basic hello world web service.
I wonder if someone has faced the same problem. I would really really appreciate any help. Thank you in advance and keep up the good work.
Cheers,
Paul.
Edited by: PaulP on Jan 11, 2012 5:31 AMHi Kal,
since we're currently evaluating the software and haven't acquired a license, we cannot contact support.
I only need to know if this is a solved bug or not. Does it have to do with the classloading process (I cannot think of anything else)?
Thank you again very very much!
Cheers,
Paul.
Maybe you are looking for
-
I have an iPad 2 and want to be able to design my own templates for invitations, labels, and such. What do I need to do to be able to do this? Apps??
-
CS4 Acrobat 9 Pro invalid serial number
I have Adobe Creative Suite 4 Master Collection Student Version. I bought it back in 2009. I recently uninstalled everything except Acrobat 9 Pro because I wanted to keep it. I opened Acrobat today and it asked me for a serial number. I typed in the
-
How much do I charge to design a co-worker's website for a starter business?
I'm not a web-designer - I'm an architect (or will be). But I got into graphic design a little, and just recently web-design. To be honest, it all seems to be coming naturally, and I just finished recreating the company-site of the place I work, and
-
Before using iBooks, members of my family were able to share their books through "Shared Devices" in iTunes. Once I moved my library to iBooks, books are not available to other members of my family. Is there a means to share books on local networks w
-
Hi Gurus We are getting the following situation: The supplier charge us 2 service in one line. A portion of the service is vatable and the rest tax exempt. The Purchase requisitioner does not know the split at the time and raise it as fully vatable.