Invoke webservice from webservice
Hi All,
I am a newbie of using JDeveloper and I have a few questions about web service. The call flow is shown as below:
Caller(Machine C) -> web service (WS_B)(Machine B) -> web service(WS_A) (Machine A)
In Machine A :
I have deployed the web service called WS_A
In Machine B :
I have created a proxy service that points to the wsdl of WS_A. Also, I have created a webservice called WS_B that invokes the proxy service so that WS_B
can communicate with WS_A
When I check the webservice (WS_B) in the browser, it always says that "oracle.classloader.util.AnnotatedNoClassDefFoundError" . Thanks a lot.
Best regards,
David
Hi David,
If you are using JDeveloper to assemble your applications, and you have used the embedded version of oc4j, you may want to double check that all your bean have been included in the application module.
Sometime the embedded version will be working, because the .class files are in the classpath used to execute the application, while they are not found in the context of the application, once deployed on a remote container.
Check the list of classes included in your .ear. Select the node "WebServices.deploy" in the "resources" node of your project, and using right-click on the selection, select the Properties options. Under "Files Groups - WEB-INF/Classes - Filters", make sure all the classes have been selected.
Hope it helps,
-Eric
Similar Messages
-
ProcessRemoteException when invoke webservice from Oracle E-Business Suite
Hi,when i invoke webservice from Oracle E-Business Suite R12.1 – Integrated SOA Gateway’s
I get following exception.
fuego.soaptype.SoapExecutionException
at fuego.soaptype.SoapCall.processRemoteException(SoapCall.java\:750)
at fuego.soaptype.SoapCall.invoke(SoapCall.java:238)
at fuego.soaptype.SoapObject.invoke(SoapObject.java:309)
at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
at xobject.Fuego__AutoGen__Screenflows__.__SubmitReport.initializeReport(__SubmitReport.xcdl:30)
at.......
this webserivce has been deployed and granted. and I can test it with soapUI.
my code:
configuration as Configuration = Configuration("FND_PROGRAM_Service");
endpoint as HttpEndpoint=HttpEndpoint("http://ep066020.bscdev.net:8002/webservices/SOAProvider/plsql/fnd_program/");
endpoint.setUsername("sysadmin");
endpoint.setPassword("sysadmin");
configuration.endpoint = endpoint;
usernameTokenPlain as UsernameTokenProfileSecurityPolicy=UsernameTokenProfileSecurityPolicy("sysadmin","sysadmin");
usernameTokenPlain.usernameTokenPasswordType = UsernameTokenPasswordType.PASSWORD_TEXT;
policies as SecurityPolicy[];
policies[]=usernameTokenPlain;
configuration.securityPolicies = policies;
service as FND_PROGRAM_Service= FND_PROGRAM_Service(configuration)
sh as SoaHeader = SoaHeader();
sh.namespace="";
sh.responsibilityApplName="SYSADMIN"
sh.responsibilityName="System Administrator"
sh.securityGroupName="STANDARD"
sh.nlsLanguage="AMERICAN"
pam as InputParameters9 = InputParameters9()
result as OutputParameters
pam.application="SQLGL";
pam.executableshortname="ENABLED"
do
logMessage "333333333333333";
executableexists service
using header = sh,
body = pam
returning result = bodyOutput (throw exception)
logMessage "2222222222222";
reportSF.description=String.valueOf(result.fndprogram24executableexists)
reportSF.comments="11111111111";
on ex as Any
logMessage "aaaaaaaaaaaa"+ex
endI've encounter something similar to you're problem and it was resolved by manually creating the object using the web service constructor and inputting user credentials. If you manually instantiate your web service wrapper object and set a a security profile token, it may solve your problem. You can also pass in the web service endPoint URL, if you want.
Fuego.WebServices.UsernameTokenProfileSecurityPolicy
I'm not sure how to use UsernameTokenProfileSecurityPolicy, but try something like this:
Fuego.WebServices.UsernameTokenProfileSecurityPolicy policy = UsernameTokenProfileSecurityPolicy();
policy.username ="mark";
policy.password = "password";
tws = YourWebService();
response = tws.callWebServiceMethod();
I realize the security profile isn't tied anywhere to the web service, but try it anyway.
There is also some fields on the webservice, tws.setRequestHeader() that may allow you to set the username and password on the request, but this doesn't make sense to me. It shouldn't be that hard.
Edited by: Mark Peterson on Mar 19, 2010 9:14 AM
Edited by: Mark Peterson on Mar 19, 2010 9:20 AM -
Urgent: How to invoke webservice from a remote client?
How could I invoke webservice deployed on the weblogic server on different System from client residing on my System?
I would like to know the different ways to do this and the advantages and dis-advantages of each one of them.
Thanks in advance.
Nitinnitind,
Did you figure out how to connect to Weblogic web-service remotely?
I tried doing so, but I get the following error on the client-side.
A exception was thrown from the client handler sending a JAXM message.
A stack trace for a previously logged message.
Exception in handler handleRequest() method.
Exception in thread "main" java.rmi.RemoteException: null; nested exception is:
java.lang.NoSuchMethodError
java.lang.NoSuchMethodError
at weblogic.webservice.util.FaultUtil.fillDetail(FaultUtil.java:84)
at weblogic.webservice.util.FaultUtil.fillFault(FaultUtil.java:141)
at weblogic.webservice.util.FaultUtil.exception2Fault(FaultUtil.java:184
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainI
mpl.java:183)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:
218)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.j
ava:143)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:444)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:430)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:270)
at myapp.myservice.client.NoCallbackWebServiceSoap_Stub.addition(NoCallb
ackWebServiceSoap_Stub.java:62)
at myapp.myservice.client.NoCallbackWebServiceSoap_Stub.addition(NoCallb
ackWebServiceSoap_Stub.java:84)
at testclient.example(testclient.java:48)
at testclient.main(testclient.java:27) -
Cannot invoke WebService from Excel
I've created simple web service based on java class using Jdeveloper's 9.0.5.2 wizard. Java class looks like this
package test;
public class HelloNameClass
public HelloNameClass()
public String sayHello(String name)
return "Hello "+name;
I've generated stub class and invoked Web Service from it. Everything was OK. Then I've created VB class in Excel XP using "Web Service References Tool 2.0 for Visual Basic for Applications" and WSDL generated by JDeveloper. But when I try to invoke Web service from VB function
Function testWS(name As String)
Dim ws As New clsws_MyWebService1
testWS = ws.wsm_sayHello(name)
End Function
I got error
No Deserializer found to deserialize a ':name' using encoding style "http://schemas.xmlsoap.org/soap/encoding/" [java.lang.IllegalArgumentException]
I wonder if this problem comes from badly configured embedded OC4J container or it's just a bad SOAP realization in microsoft's toolkit. What should I do to Invoke WS from Excel?I have exactly the same problem ! I know where it comes from but i don't know how to solve it...
1. SYMPTOMS
I have two web services deployed on a OAS 10g :
- Web service 1 has no parameter (simple "Hello World")
- Web service 2 has one parameter : myparam
Both run perfectly using a java stub client or from a browser.
Web service 1 runs perfectly from a small Word/VBA application.
BUT Web service 2 doesn't run from the same application : "No deserializer found to deserialize ':myparam' using blablah..."
2. THE PROBLEM
The problem comes from the way the SOAP request message is designed.
Oracle HTTP server (Apache) NEEDS an info about the parameter in the SOAP request message that is not mandatory following SOAP specification, which is pretty bad for interoperability.
Microsoft doesn't provide that info (and it's okay because it is not mandatory) so the SOAP message is not understood Oracle-side.
3. SHOW ME
I used a TCP listener to catch the data sent and received by both Oracle to Oracle connection and VB to ORACLE.
The difference is located in the SOAP request where the parameter is introduced :
3.1. Oracle to Oracle
<SOAP-ENV:Envelope ...
<SOAP-ENV:Body> ...
<myparam xsi:type="xsd:int">10</myparam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
3.2. VB to Oracle
<SOAP-ENV:Envelope ...
<SOAP-ENV:Body> ...
<myparam>10</myparam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
You noticed the difference : the VB SOAP message lacks :
xsi:type="xsd:int"
It's not mandatory following the specification, but without this, it won't work on Oracle server...
I didn't find a solution yet, but perhaps this will give you some ideas ! -
Fusion Release 9 Coexistence from EBS - Invoke Webservice from EBS
The following error is seen while trying to invoke LoaderIntegrationService from EBS
Doc ID 1592028.1 has the resolution but our implementation is on cloud and we are unable to get the oimclient.jar. This is blocking our work and needs immediate help.
Need an expert advise on this issue.
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:673)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:480)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:306)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3168)
at java.lang.Class.getAnnotation(Class.java:3127)
at oracle.j2ee.ws.common.metadata.AnnotationHelper.getWebServiceAnnotation(AnnotationHelper.java:325)
at oracle.j2ee.ws.common.metadata.AnnotationHelper.getWebServiceAnnotation(AnnotationHelper.java:321)
at oracle.j2ee.ws.common.jaxws.WebServiceAttributes.<init>(WebServiceAttributes.java:45)
at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.processAnnotation(ServiceEndpointRuntimeModeler.java:122)
at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.buildRuntimeModel(ServiceEndpointRuntimeModeler.java:110)
at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.getRuntimeMetadata(WsClientProxyFactory.java:69)
at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:126)
at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:483)
at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:467)
at javax.xml.ws.Service.getPort(Service.java:160)
at com.oracle.xmlns.apps.hcm.common.batchloader.core.loaderintegrationservice.LoaderIntegrationService_Service.getLoaderIntegrationServiceSoapHttpPort(LoaderIntegrationService_Service.java:68)
at aldr.oracle.apps.aldrhr.UploadFileUCM.runProgram(UploadFileUCM.java:165)
at oracle.apps.fnd.cp.request.Run.main(Run.java:156)Please see if the solution in (FND_SOA_SERVICE_EXECUTION_ERR Error When Invoking EBS SOA Gateway Web Service [ID 1512956.1]) is applicable.
Thanks,
Hussein -
Exception while invoking webservice
I have created a client jar containing stub and port classe, deployment descritor
and deployed webservices. Webservices are working fine but while invoking webservice
with client code i am getting Exception, can somebody please help me to resolve
it ?
[2004-02-09 02:21:53,917] [ExecuteThread: '14' for queue: 'weblogic.kernel.Default']
ERROR [testclient.TestServlet] Error in call object:SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
Exception during processing: java.io.IOException: Received a response from url:
http://localhost:7001/ipc-ws which did not have a valid SOAP content-type: text/html.
(see Fault Detail for stacktrace)
Detail:
<detail>
<bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">
</bea_fault:stacktrace>java.io.IOException: Received a response from url: http://localhost:7001/ipc-ws
which did not have a valid SOAP content-type: text/html.
at weblogic.webservice.binding.http11.Http11ClientBinding.handleErrorResponse(Http11ClientBinding.java:156)
at weblogic.webservice.binding.http11.Http11ClientBinding.receive(Http11ClientBinding.java:220)
at weblogic.webservice.core.handler.ClientHandler.handleResponse(ClientHandler.java:63)
at weblogic.webservice.core.HandlerChainImpl.handleResponse(HandlerChainImpl.java:184)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:214)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:131)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:439)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:425)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:275)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:250)
at com.hp.ws.testclient.CreateConfigPort_Stub.createConfig(CreateConfigPort_Stub.java:26)
at com.hp.ws.testclient.TestServlet.callService(TestServlet.java:267)
at com.hp.ws.testclient.TestServlet.doPost(TestServlet.java:143)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305
Thanks
RatnakarHello,
There is not enough information in your post to determine an exact
cause. When you say the web services are working fine, do you mean from
the home/test page? What version of WLS? Is this with a static or
dynamic client. I'm a bit concerned about what seem to be stubs showing
up on the traceback that would indicate another SOAP stack (com.hp.ws)
could you tell us a bit more about your configuration.
Thanks,
Bruce
Ratnakar Katre wrote:
>
I have created a client jar containing stub and port classe, deployment descritor
and deployed webservices. Webservices are working fine but while invoking webservice
with client code i am getting Exception, can somebody please help me to resolve
it ?
[2004-02-09 02:21:53,917] [ExecuteThread: '14' for queue: 'weblogic.kernel.Default']
ERROR [testclient.TestServlet] Error in call object:SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
Exception during processing: java.io.IOException: Received a response from url:
http://localhost:7001/ipc-ws which did not have a valid SOAP content-type: text/html.
(see Fault Detail for stacktrace)
Detail:
<detail>
<bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">
</bea_fault:stacktrace>java.io.IOException: Received a response from url: http://localhost:7001/ipc-ws
which did not have a valid SOAP content-type: text/html.
at weblogic.webservice.binding.http11.Http11ClientBinding.handleErrorResponse(Http11ClientBinding.java:156)
at weblogic.webservice.binding.http11.Http11ClientBinding.receive(Http11ClientBinding.java:220)
at weblogic.webservice.core.handler.ClientHandler.handleResponse(ClientHandler.java:63)
at weblogic.webservice.core.HandlerChainImpl.handleResponse(HandlerChainImpl.java:184)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:214)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:131)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:439)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:425)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:275)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:250)
at com.hp.ws.testclient.CreateConfigPort_Stub.createConfig(CreateConfigPort_Stub.java:26)
at com.hp.ws.testclient.TestServlet.callService(TestServlet.java:267)
at com.hp.ws.testclient.TestServlet.doPost(TestServlet.java:143)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305
Thanks
Ratnakar -
Error while invoking webservice in bipublisher 10g
Hi All,
When we are invoking webservice from bi publisher 10g we are getting the following error.
Error: java.util.arraylist
Can any one help us.
Thanks.Is there any log you can paste here
you should have the logs in
~BIPublisherTrialEdition\bip\server\domains\bipdomain\servers\bipserver\logs -
Problem while invoking webservice-method in client-code
Hi,
I had written webservice-client-code (using uddi-ext.jar, as i am using uddi for publishing webservices.) which is invoking webservice method successfully with complex datatypes(both for return type and input paramters).
But while calling following webservice-method from my client-code:
public ComplexType[] getData(String[] p_str1, String[] p_str2)
it is throwing exception
The Exception is:
[ERROR] - 27 Mar 2007 12:34:38 -failed to invoke operation 'getData' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure. type=['java:language_builtins.lang']:ArrayOfString schema context=TypedSchemaContext{javaType=[Ljava.lang.String;}]
Although I had done correct registration of mapping of ArrayOfString in client-code:
registry = m_Service.getTypeMappingRegistry();
m_TypeMapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING );
m_TypeMapping.register( ArrayOfStringHolder.class,
new QName( "java:language_builtins.lang", "ArrayOfString" ),
new ArrayOfStringCodec(),
new ArrayOfStringCodec());
But some how it doesnt works.
I had searched on google as well but didnt find any reliable solutions.
Please advice.
Edited by meetmrdeepak at 03/27/2007 2:43 AM
Edited by meetmrdeepak at 03/27/2007 2:45 AMSee item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
-
Issues invoking webservice hosted on Aqualogic Proxy service.
Hi,
This is my first "Hello world..." forum experience.
I'm facing problems while invoking webservice hosted on Aqualogic Proxy Service in my local machine;
I'm using Weblogic 10 (Oracle Service Bus 10gR3 ).
1) I've used weblogic's "weblogic.wsee.tools.anttasks.ClientGenTask" to generate java code from wsdl file
2) Created a stand-alone client
code fragment :
try{
ServiceActivationNoticationService notificationService = new ServiceActivationNoticationService_Impl("http://localhost:7001/ServiceActivationInterface/FroxyServices/ServiceNotification".concat("?WSDL"));
ServiceActivationNoticationPortType notificationServicePortType = notificationService.getServiceNotification();
Empty response = ((ServiceActivationNoticationPortType_Stub)notificationServicePortType).serviceNotification(notification);
catch(){
System.err.println(ex.toString());
logger.debug("Service Notification Exception...", ex);
throw new Exception("Service Notification Exception...", ex);
Comiling successfully but when I run I'm getting the follwing exceptions:
Caused by: java.lang.NullPointerException
at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType$ElementQNameProperty.access$000(ByNameRuntimeBindingType.java:314)
at com.bea.staxb.runtime.internal.ByNameRuntimeBindingType.getMatchingElementProperty(ByNameRuntimeBindingType.java:253)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.findMatchingElementProperty(ByNameUnmarshaller.java:71)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:43)
at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshal(AttributeUnmarshaller.java:38)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:174)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:212)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalElement(UnmarshalResult.java:227)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshalElement(UnmarshallerImpl.java:166)
at weblogic.wsee.bind.runtime.internal.LiteralDeserializerContext.unmarshalElement(LiteralDeserializerContext.java:87)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeElement(BaseDeserializerContext.java:180)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeElement(BaseDeserializerContext.java:115)
at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:490)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeReturn(SoapDecoder.java:400)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:170)
at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:121)
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:175)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeOutput(CodecHandler.java:126)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:103)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleResponse(CodecHandler.java:80)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:236)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:220)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:159)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:114)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:331)
... 3 more
But If I create a soap message manully and invoke the same webservice, it works fine.
Please reply soon....
Thanks in Advance.Hi James,
Thanks for your reply, and directing me to appropriate threads.
The problem is with one of wsdl element.
My requirement is an empty element:
so I've created
<element name="empty">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</element>
when I use this element for output type as below...
<wsdl:input message="service" type="xxx:service"/>
<wsdl:output message="emptyResponse" type="xxx:empty"/>
weblogic clientgen code is able invoke service successfully but the response is causing problem.
But when I changed empty element to
<element name="empty">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="abcd" type="xsd:string" minOccurs="0"/> I'll not use this at all.
</xsd:sequence>
</xsd:complexType>
</element>
Everything is working fine now in this case. ************************************************************************
But I'm not sure what's wrong with
<element name="empty">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</element> because specifications says this is the way to define an empty element type.
What's wrong with this....
Thanks.... to Hello world! Response.... -
Error while invoking webservice throu https
Error while invoking webservice throu https://
can any one help me on this topic please:
CODE:
SOAPConnection con = null;
try{
String endpoint = "https://wks3089639:4565/Service.serviceagent/PortTypeEndpoint1";
//String endpoint = "http://wks3101999:5539/Service.serviceagent/PortTypeEndpoint1";
//String endpoint = args[0];
//String soapAction = args[1];
System.out.println("javax.net.ssl.keyStore-->"+System.getProperty("javax.net.ssl.trustStore"));
System.setProperty("javax.net.ssl.trustStore","C:/Documents and Settings/1067555/Desktop/certificates/cer.jks");
System.setProperty("javax.net.ssl.keyStore","C:/Documents and Settings/1067555/Desktop/certificates/server.keystore");
System.setProperty("javax.net.ssl.trustStorePassword","password");
System.setProperty("javax.net.ssl.keyStorePassword","password");
// use Sun's reference implementation of a URL handler for the "https" URL protocol type.
//System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
// dynamically register sun's ssl provider
System.setProperty("security.provider","com.sun.net.ssl.internal.ssl.Provider");
//Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.out.println("javax.net.ssl.trustStore-->"+System.getProperty("javax.net.ssl.trustStore"));
System.setProperty("javax.net.debug","ssl,handshake");
SOAPConnectionFactory connectionFactory = SOAPConnectionFactory.newInstance();
con = connectionFactory.createConnection();
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
// MimeHeaders headers = message.getMimeHeaders();
// headers.addHeader("SOAPAction", soapAction);
// headers.addHeader("SOAPAction", "/Service.serviceagent/PortTypeEndpoint1/Operation");
// headers.addHeader("Content-Type","text/xml");
// headers.addHeader("charset","utf-8");
MimeHeaders headers = message.getMimeHeaders();
headers.addHeader("SOAPAction", "/Service.serviceagent/PortTypeEndpoint1/sampleOperation");
headers.addHeader("Content-Type","text/xml");
headers.addHeader("charset","utf-8");
StreamSource inputmsg = new StreamSource(new FileInputStream("client.wsdl"));
soapPart.setContent(inputmsg);
System.out.println("REQUEST:\n");
message.writeTo(System.out);
System.out.println();
message.saveChanges();
SOAPMessage reply = con.call(message, new URL(endpoint));
System.out.println("RESPONSE:\n"+reply.toString());
System.out.println("Header:::"+reply.getSOAPHeader());
System.out.println("Body:::"+reply.getSOAPBody());
System.out.println("RESPONSE:\n");
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
//Extract the content of the reply
Source responseContent = reply.getSOAPPart().getContent();
//Set the output for the transformation
StreamResult result = new StreamResult(System.out);
transformer.transform(responseContent, result);
System.out.println();
}catch(Exception e){
e.printStackTrace();
finally{
con.close();
Exception:
10-Nov-2008 11:55:04 com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
SEVERE: SAAJ0009: Message send failed
com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:127)
at com.Sample.main(Sample.java:91)
Caused by: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
... 1 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:325)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)
... 3 more
Caused by: java.net.ConnectException: Connection refused: 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.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:282)
... 4 more
CAUSE:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
at com.Sample.main(Sample.java:91)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:325)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)
... 3 more
Caused by: java.net.ConnectException: Connection refused: 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.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:282)
... 4 more
CAUSE:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
at com.Sample.main(Sample.java:91)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:325)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)
... 3 more
Caused by: java.net.ConnectException: Connection refused: 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.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:282)
... 4 more
Edited by: javausers07 on Nov 10, 2008 11:58 AMI hope the sun forum can help for me. Lets see
-
ADF forms based on BPM human tasks - Invoking webservices/view objects.
Hi All,
Is anyone aware of whether the following is a valid implementation that has been carried out before.
1. ADF forms based on BPM 11G human tasks.
2.The ADF forms invoke webservices via Webservice data controls. It is pertinent to note that the webservice bring back complex data types. We've tried writing a few forms, resulting in data benig brought back, but not being able to print them to the screen.
3. The ADF forms also use View Object based on sql to bring back tables of data. If view objects are embedded within the forms, the applciation gives rise to a null pointer exception.
Considering the form will be invoked via a BPM worklist entry, is there a setting or configuration we should consider before hand. Is this feasible, is there knowledge of this being done commercially.
Any examples or information regarding the same will be immensely helpful.
Thanks and Regards,
Preethi.
NB : I have posted this in the BPM forum as well as I feel it is relevant to both BPM and ADF.Hi Joonas.
Plese let me explain me better for your understanding
A big summary for what I meant it's the following:
1- In the procces you made, when you add the HT activity, you have to implement it, this means declare the input(s) parameters you want. This implementation create the .task file.
2- Create an application, and projects as HT you have. Each poject are based on the .task file, and automatically create a Data Control (for each project based on a .task) with all you need.
This w'll be an empty application, so you can customize it all you want. The task selected should have all the parameters previously defined. Those parameters can change if you want.
2- Create a page(s) in the task flow for the task implementation. You can even split the the payload of the task in differents pages, create your custom pages and any logic you need.
3- An important aspect is how to match these application with the HT implemented in the process. It's possible, it's a configuration en the Enterprise Manager.
4- Deploy your application
All these are explain in the book I mentioned
Th book you can find it here:
https://blogs.oracle.com/soacommunity/entry/oracle_soa_suite_11g_handbook_1
Regards Dariel.
PS: Please, let me know if you need more details. -
Errors while invoking webservice
I am getting below error while invoking webservice in jdev:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Failure in SDOSerializer.deserialize.</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>
I can see only below log in jdev server log :
<oracle.adf.model> <SDOHelper> <findHelperContext> <SDOHelperContext identified by {http://xmlns.oracle.com/apps/projects/projectManagement/common/projectServiceV2/}ProjectService has not been defined yet!>
<oracle.adf.model> <SDOHelper> <findHelperContext> <SDOHelperContext identified by {http://xmlns.oracle.com/apps/projects/projectManagement/common/projectServiceV2/}ProjectService has not been defined yet!>
could anybody help me to understand what gone wrong ?This thread might help you:
Problems invoke Web Service -
Error while invoking Webservice API ItemService_GetItemInformation
The following error is encountered while invoking Webservice API "ItemService_GetItemInformation"
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<faultcode>wsse:InvalidSecurity</faultcode>
<faultstring>Missing <wsse:Security> in SOAP Header</faultstring>
<faultactor/>
</env:Fault>
</env:Body>
</env:Envelope>
Same is repeated even after passing
RESPONSIBILITY_NAME => Inventory
RESPONSIBILITY_APPL_NAME => INV
SECURITY_GROUP_NAME => Standard
NLS_LANGUAGE => AMERICAN
Any pointer for the root cause of this error & how to resolve this?
Thanks In Advance!
priyadarshiHi ..
The error meaning: you need input the user_name and password for the SOAPHeader -
I am having an issue after I setup webservice, I am able to retrive column on the Datstore but when I test it to invoke webservice I am getting following error. I have checked the service, All the methods are available for invoking webservice. Any clue on this...........?
Just pasting part of error message..................
com.sunopsis.wsinvocation.SnpsWSInvocationException: java.lang.NoSuchMethodError: org.apache.axis2.AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
at com.sunopsis.wsinvocation.client.a.a.d.requestReply(d.java)
at com.sunopsis.graphical.wsclient.f.b(f.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoSuchMethodError: org.apache.axis2.AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
Caused by:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: java.lang.NoSuchMethodError: org.apache.axis2.AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NoSuchMethodError: org.apache.axis2.AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)Yes ofcourse I choose a method. I am suspecting if we need any patches for OAS to get this thing fix. We are running OAS 10.3 and Axis2 1.3. Did any one use this combination and got this issue before??
-
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.... -
Invoke Webservices using SAPXI
Hi,
I am following this weblog
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
where can I calculator webservice.
Its not available in http://xmethods.com/ve2/index.po
Thanks
dushanth
Message was edited by:
dushanth ryThanks Prateek for the link
I am new to webservice. Pls help me
when I open the link you mentioned
I clicked on ADD...
It gives me SOAP 1.1 and SOAP 1.2 which one I have to use it and how I should start the scenario (I should use this as inbound interface or outbound interface)
could you pls explain the steps ? It would be really helpful for me
thanks
dushanth
Message was edited by:
dushanth ry
Maybe you are looking for
-
I need to access the trash bin in finder (to find files) on my external drive
the external hard drive i link iphoto to has had an error and basically the iphoto package is hoarding all of my photos so i'm searching everywhere i can to piece back the 1 TB of photos that are gone. data recovery is too expensive from what i have
-
Sorry, I may not know how to describe this in the correct technical manner, but I'll explain in as simple terms as I can. I open up Crystal Reports 2013 click new document and it begins to ask for Database Expert. I select Universes and log in to my
-
Invoice List Job for F2 Only. Exclude other Billing types, e.g. L2,
Hi: We have just set up a job for invoice list. Everything seems to ran alright until customer service created a debit memo (L2) for that customer and the debit memo got consolidated with the rest of the F2. I understand that L2 will be consoli
-
Hi, I was going through one of the notes for client export and got a step by step procedure. Just one confusion is that do I need to create the Client using Transaction SCC4 in source system before starting the export from target system. Also in t
-
Ipod Touch ( 2nd Gen ) Drivers will not install on my computer! HELP!
We are trying to dump my 2nd generation Ipod and reload everything in it so that I can give it to my son to use- But the drivers are NOT installing in my computer, any ideas why?