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 AM
See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
Similar Messages
-
Connection problem while invoking remote method from client using oracle 8.1.6 server
while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.
r singh wrote:
>
I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
the start up of the server.
My settings:
- WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
- I created the connection pool for oracle with the following
parameters:
connection name: OracleConnectionPool
url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
driver class name: oracle.jdbc.driver.OracleDriver
properties: user=scott
password=tiger
- I have also downloaded classes12.zip and nls_charset12.zip from
Oracle.com
and have placed under $WL_HOME/lib.
- I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
in
front of the $CLASSPATH in the startWeblogic.sh script. The echoed
classpath
from the startup script is:
/opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
_sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
- Still I get the error:
<Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
connection pool "Or
acleConnectionPool" No suitable driver>
Can somebody point me out if i am doing anything wrong here.
Thanks.
RamanandHi,
Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
Joe -
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.... -
Access Denied Error While invoking WebService Method
Hi,
When i am trying to invoke web service method from client machine, it throws an Error 401 - Access Denied (Detail Error Shown below)....
Please let me know to set WindowsAuthentication UserName and Password in WebService calling through Java. Here Iam using Stub class to connect WebService through Java...
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (401)Access Denied
faultActor:
faultNode:
faultDetail:
{}:return code: 401
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>
<head>
<style>
a:link {font:8pt/11pt verdana; color:FF0000}
a:visited {font:8pt/11pt verdana; color:#4e4e4e}
</style>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<title>You are not authorized to view this page</title>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</head>
<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.URL;
//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
function HtmlEncode(text)
return text.replace(/&/g, '&').replace(/'/g, '"').replace(/</g, '<').replace(/>/g, '>');
function TagAttrib(name, value)
return ' '+name+'="'+HtmlEncode(value)+'"';
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
function URI(href)
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
function InsertElementAnchor(href, text)
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
//-->
</script>
<body bgcolor="FFFFFF">
<table width="410" cellpadding="3" cellspacing="5">
<tr>
<td align="left" valign="middle" width="360">
<h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->You are not authorized to view this page</h1>
</td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">You do not have permission to view this directory or page using the credentials you supplied.</font></td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">
<hr color="#C0C0C0" noshade>
<p>Please try the following:</p>
<ul>
<li>Click the Refresh button to try again with different credentials.</li>
<li>If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the
<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
Homepage();
//-->
</script>
home page.</li>
</ul>
<h2 style="font:8pt/11pt verdana; color:000000">HTTP 401.2 - Unauthorized: Logon failed due to server configuration<br>
Internet Information Services</h2>
<hr color="#C0C0C0" noshade>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Background:<br>
This is usually caused by a server-side script not sending the proper WWW-Authenticate header field. Using Active Server Pages scripting this is done by using the <strong>AddHeader</strong> method of the <strong>Response</strong> object to request that the client use a certain authentication method to access the resource.
<p>
<li>More information:<br>
Microsoft Support
</li>
</p>
</ul>
</font></td>
</tr>
</table>
</body>
</html>
{http://xml.apache.org/axis/}HttpErrorCode:401
(401)Access Denied
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at engine.citynet_dta.IDTAEngineStub.sendMessage(IDTAEngineStub.java:219)
at test.Test.main(Test.java:37)I hope the sun forum can help for me. Lets see
-
RMI: connection refused error while invoking remote method from client mac.
Hi All,
when i run client program, which is calling remote object from other system, it shows the below error.
please help me solving this issue, i also have policy file and installed security manager.
Exception in Cliendjava.rmi.ConnectException: Connection refused to host: 10.66.
112.137; nested exception is:
java.net.ConnectException: Connection refused: connect
thanks in advance.
Regards,
Anand.See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
-
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
-
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 onHeartBeat() method, exception is "Cannot load header
I have a problem that when I read out an IMAP mailbox I sometimes get the above problem, and sometimes I don't get the problem.
Below I attached the main parts of my environment to get an insight within the code:
bpel.xml of process that is reading out the IMAP mailbox
<activationAgents>
<activationAgent className="com.collaxa.cube.activation.mail.MailActivationAgent"
heartBeatInterval="60">
<property name="accountName">account</property>
</activationAgent>
account.xml
<mailAccount xmlns="http://services.oracle.com/bpel/mail/account">
<userInfo>
<displayName>Eneco Process lAyer</displayName>
<organization>iFactory</organization>
<replyTo>[email protected]</replyTo>
</userInfo>
<outgoingServer>
<protocol>smtp</protocol>
<host>10.126.16.73</host>
<port>25</port>
<authenticationRequired>false</authenticationRequired>
</outgoingServer>
<incomingServer>
<protocol>imap</protocol>
<host>10.126.20.8</host>
<port>143</port>
<email>IFACAORTA</email>
<password>CRYPT{IB3B7SrA3kMYHoBDzWwsEg==}</password>
<folderName>InBox</folderName>
</incomingServer>
</mailAccount>
The domain.log of the appserver
<2006-12-04 15:08:25,546> <ERROR> <default.collaxa.cube.activation> <HeartBeatListenerJob::execute> Error while invoking onHeartBeat() method, exception is "Cannot load header".
<2006-12-04 15:08:25,562> <ERROR> <default.collaxa.cube.activation> <HeartBeatListenerJob::execute> Error while invoking onHeartBeat() method, exception is "No content".This problem is occuring only on BPEL release 10.1.3.
I retested this again on BPEL 10.1.2, but there the problem did not occur. -
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 onHeartBeat() method, exception is "Username supplied
hi ...
I am trying to invoke bpel process when we get email..
but i am getting the following error..
Error while invoking onHeartBeat() method, exception is "Username supplied in error".
<mailAccount xmlns="http://services.oracle.com/bpel/mail/account">
<userInfo>
<displayName>Oracle BPM</displayName>
<organization>xxx</organization>
<replyTo>bpel@localhost</replyTo>
</userInfo>
<outgoingServer>
<protocol>smtp</protocol>
<host>xxxxx</host>
<authenticationRequired>false</authenticationRequired>
</outgoingServer>
<incomingServer>
<protocol>pop3</protocol>
<host>xxxxx</host>
<port>143</port> -- tried with 110 prot also
<email>xxxx</email>
<password></password>
<folderName>Inbox</folderName>
<authenticationRequired>false</authenticationRequired>
</incomingServer>
</mailAccount>
Can any one help me on this ?
thanks,
bharathThis problem is occuring only on BPEL release 10.1.3.
I retested this again on BPEL 10.1.2, but there the problem did not occur. -
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 -
Error while invoking ContactQueryPage method from contact.wsdl
Hi All,
Could any one provide me the java client for OnDemand webservice (contact.wsdl). I want to query ContactQueryPage operation.
I am facing some problem while making a call. I am trying with both Axis call as well as ContactStub. but its not working in either way.
Here is the snnipet I am using to invoke a method using ContactStub
String endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration;"+jessionId;
ContactStub stub = new ContactStub(endpoint);
ContactWS_ContactQueryPage_Output queryOutput = null;
ContactWS_ContactQueryPage_Input queryInput = new ContactWS_ContactQueryPage_Input();
ListOfContact listOfContact = new ListOfContact();
Contact contact = new Contact();
queryInput.setListOfContact(listOfContact);
queryInput.setUseChildAnd("Contact");
queryInput.setPageSize("10");
queryInput.setStartRowNum("1");
queryOutput = stub.ContactQueryPage(queryInput);
When I run the program..I get following exception :
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
Can any one help me out. Its needed urgently.
Thanks & Regards,
SanjayHi !
From what I see, the only problem is the setUseChildAnd function which is waiting for a true or false argument and not a char...
Hope this will help, feel free to ask more !
Max -
HTTP(S) Timeout while invoking WebService over HTTPS.
Hello,
I have some stress with my webservice client implementation.
I do the following (I can post source code if needed):
- As usual:
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
- Install my TrustManager
- Install my DefaultHostnameVerifier
- Register a custom type
- Make a javax.xml.rpc.Call to access a webservice
My observations:
The code works well when using an HTTP URL, just changing the target URL to HTTPS causes the problem.
The HTTPS web service (on server) works well seeing a HTTPS client using the weblogic SSL implementation, or an AXIS client can easily connect.
When I use a simple and direct "Open HttpsURLConnection on URL("https://xxx.service?WSDL"); print-out-all-that's-coming-in", it works well. I think my SSL access is made correctly.
The client does not complain about not-installed SSL things, all certificates are accepted, etc. No problem at this part.
System.setProperty("javax.net.debug", "all") is set, but i dont see anything of interrest.
I use the packages contained in 'java_xml_pack-summer-02_01' of SUN (jaxm-1.1_01, jaxp-1.2_01,jaxr-1.0_02 etc and the jsse 1.0.3).
The server is weblogic 7.
Calling
call.setTargetEndpointAddress("http://arakis:7001/traces_ws/searchCertificate");
works well while
call.setTargetEndpointAddress("https://arakis:7002/traces_ws/searchCertificate");
causes (after 2 minutes):
HTTP transport error: java.net.SocketException: Unexpected end of file from server
at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:189)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:73)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:279)
at SSLSOAPClient.main(SSLSOAPClient.java:264)
CAUSE:
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:699)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:697)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at com.sun.xml.rpc.client.http.handler.HttpURLConnection.getInputStream(HttpURLConnection.java:543)
at com.sun.xml.rpc.client.http.handler.HttpURLConnection.getResponseCode(HttpURLConnection.java:920)
at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:123)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:73)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:279)
at SSLSOAPClient.main(SSLSOAPClient.java:264)
Exception in thread "main"
What I note is that the call is using a HttpURLConnection object and NOT a HttpsURLConnection object (so problems are 'normal' i guess), but I dont have any clue what I have to do to instruct the client to use HTTPS other than specifying HTTPS in the target.
Hope someone has an idea
TashaHello,
The default timeout in Axis is 60 seconds, you can change it by your client code, and you can still keep the session to call many times
((org.apache.axis.client.Stub)service).setMaintainSession(true); //keep session
((org.apache.axis.client.Stub)service).setTimeout(60*1000*30); //half hour
Lixin -
Error while invoking a Dataservice from client application
Hi,<br><br>
Code snippet of Client to invoke DataService is....<br><br>
Hashtable h = new Hashtable();<br>
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");<br>
h.put(Context.PROVIDER_URL,"t3://10.1.5.31:7001");<br>
h.put(Context.SECURITY_PRINCIPAL,"weblogic");<br>
h.put(Context.SECURITY_CREDENTIALS,"weblogic"); <br>
Context context = new InitialContext(h);<br>
DataService ds =DataServiceFactory.newDataService(context, "HLCApp","ld:HLCAppDataServices/com/pfizer/hlc/dataservices/HCP_DETAILS"); <br>
<u>DataObject obj= (DataObject) ds.invoke("HCP_DETAILS", null);</u><br>
System.out.println(" HCP details : \n" + obj);
<br><br><br>
The line(which is underlind) is causing the error(I checked by putting some System.outs).
<br>
While invoking a DataService from the Client application(Java Client) I am getting the following error in the console.
<br><br>
Exception in thread "main" com.bea.ld.dsmediator.client.exception.SDOMediatorExc
eption: com.bea.ld.dsmediator.client.exception.SDOMediatorException: weblogic.rj
vm.PeerGoneException: ; nested exception is:
java.io.EOFException
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invoke(XmlDataService
Base.java:114)
at com.pfizer.hlc.DSClient.HCP.main(HCP.java:23)
Caused by: com.bea.ld.dsmediator.client.exception.SDOMediatorException: weblogic
.rjvm.PeerGoneException: ; nested exception is:
java.io.EOFException
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invokeQuery(XmlDataSe
rviceBase.java:183)
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invoke(XmlDataService
Base.java:102)
... 1 more
Caused by: weblogic.rjvm.PeerGoneException: ; nested exception is:
java.io.EOFException
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:248)
at com.bea.ld.Server_ydm4ie_EOImpl_816_WLStub.executeFunction(Unknown So
urce)
at com.bea.ld.dsmediator.client.XmlDataServiceBase.invokeQuery(XmlDataSe
rviceBase.java:157)
... 2 more
Caused by: java.io.EOFException
at weblogic.rjvm.t3.T3JVMConnection.endOfStream(T3JVMConnection.java:897
at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.ja
va:599)
at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:549)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:707)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:654)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:2
82)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
<br><br><br><br>
<b>And in the server's log file the exception is like below</b><br><br>
<Nov 1, 2006 4:29:31 PM IST> <Error> <RJVM> <gsipl-c2-8> <cgServer> <ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <BEA-000503> <Incoming message header or abbreviation processing failed
<b>java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940</b>
java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
at java.io.ObjectStreamClass.initNonProxy(Ljava.io.ObjectStreamClass;Ljava.lang.Class;Ljava.lang.ClassNotFoundException;Ljava.io.ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Z)Ljava.io.ObjectStreamClass;(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Z)Ljava.io.ObjectStreamClass;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown Source)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:33)
at java.io.ObjectInputStream.readExternalData(Ljava.io.Externalizable;Ljava.io.ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown Source)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:212)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:251)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:748)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:782)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
<br><br><br>
<b>My workstation environment is</b>
Weblogic 8.1 SP6,Aqualogic 2.0 ,os is WindowsXP and JDK is jrockit81sp6_142_10.
<br><br><br>
Does anyone have any idea, why i am getting this error.
<br><br>
Thanks,<br>
Suresh varma.Hi Suresh varma
Did you get any answer for your problem?
I'm having the exact same problem. Working with Weblogic 8.1 SP6 and getting this strange message whenever I'm calling my data service.
I've followed the guidlines given on the URL posted here, and still getting the same message.
Let me know if you have any idea.
Cheers
Rod -
Error while invoking webservice
i am trying to use webservice (by using data->import
wsdl). I am sending request (invoking web method by using classes
generated after imporing wsdl).
Here is the code i m trying.
public function getCompanyInfoById(companyId:String):void
var wsNML:CampaignSettings =new CampaignSettings();
wsNML.addgetCompanyInfoByIdEventListener(getCompanyInfo);
//wsNML.addCampaignSettingsFaultEventListener(faultHandler);
wsNML.getCompanyInfoById(companyId);
private function
getCompanyInfo(e:GetCompanyInfoByIdResultEvent):void
var companyInfo:ArrayOfCampaignSettingsCDO=new
ArrayOfCampaignSettingsCDO();
companyInfo=e.result;
companyInfo.removeItemAt(0);
//logic continues....
the same code is working fine for my other web methods(for my
another web services). Also the same is working fine when i use the
same web service in some other project. but when i use this
webservice in my original project, its not working. its throwing
the following error:
"ReferenceError: Error #1065: Variable
ArrayOfCampaignSettingsCDO is not defined.
at global/flash.utils::getDefinitionByName()
at
mx.rpc.xml::SchemaTypeRegistry/getCollectionClass()[E:\dev\flex_3_beta3\sdk\frameworks\pr ojects\rpc\src\mx\rpc\xml\SchemaTypeRegistry.as:106]
at
mx.rpc.xml::XMLDecoder/createContent()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\sr c\mx\rpc\xml\XMLDecoder.as:1830]
at
mx.rpc.xml::XMLDecoder/decode()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rp c\xml\XMLDecoder.as:168]
at
mx.rpc.soap::SOAPDecoder/decodeBody()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src \mx\rpc\soap\SOAPDecoder.as:439]
at
mx.rpc.soap::SOAPDecoder/decodeEnvelope()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc \src\mx\rpc\soap\SOAPDecoder.as:291]
at
mx.rpc.soap::SOAPDecoder/decodeResponse()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc \src\mx\rpc\soap\SOAPDecoder.as:223]
at
generated.webservices::BaseCampaignSettings/processResult()[D:\Projects\NML2008\wsdl\gene rated\webservices\BaseCampaignSettings.as:411]
at
mx.rpc::AsyncResponder/result()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rp c\AsyncResponder.as:73]
at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx \rpc\AsyncRequest.as:81]
at
DirectHTTPMessageResponder/completeHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\ rpc\src\mx\messaging\channels\DirectHTTPChannel.as:387]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()"
Please help me out.hi kcell, thanks 4 ur help.
here is the wsdl:
<?xml version="1.0"
encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="
http://www.w3.org/2001/XMLSchema"
xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/"
xmlns:tns="
http://tempuri.org/"
targetNamespace="">
http://tempuri.org/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="">
http://tempuri.org/">
<s:element name="GetCompanyInfoById">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="companyId"
type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCompanyInfoByIdResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0"
name="GetCompanyInfoByIdResult"
type="tns:ArrayOfCampaignSettingsCDO"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfCampaignSettingsCDO">
<s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0"
name="CampaignSettingsCDO" nillable="true"
type="tns:CampaignSettingsCDO"/>
</s:sequence>
</s:complexType>
<s:complexType name="CampaignSettingsCDO">
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="companyId"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="companyName"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0"
name="companyAddress1" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0"
name="companyAddress2" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="companyCity"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="companyState"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="companyZip"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0"
name="companyWebAddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="userId"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="salutation"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="firstName"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="lastName"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="title"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="workPhone"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="email"
type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="password"
type="s:string"/>
</s:sequence>
</s:complexType>
</wsdl:types>
<wsdl:message name="GetCompanyInfoByIdSoapIn">
<wsdl:part element="tns:GetCompanyInfoById"
name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetCompanyInfoByIdSoapOut">
<wsdl:part element="tns:GetCompanyInfoByIdResponse"
name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:operation name="GetCompanyInfoById">
<wsdl:input message="tns:GetCompanyInfoByIdSoapIn">
</wsdl:input>
<wsdl:output message="tns:GetCompanyInfoByIdSoapOut">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CampaignSettingsSoap12"
type="tns:CampaignSettingsSoap">
<soap12:binding transport="">
http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetCompanyInfoById">
<soap12:operation soapAction="
http://tempuri.org/GetCompanyInfoById"
style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetCompanyInfoById">
<soap:operation soapAction="
http://tempuri.org/GetCompanyInfoById"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CampaignSettings">
<wsdl:port binding="tns:CampaignSettingsSoap12"
name="CampaignSettingsSoap12">
<soap12:address location="">
http://localhost/NML/CampaignSettings.asmx"/>
</wsdl:port>
<wsdl:port binding="tns:CampaignSettingsSoap"
name="CampaignSettingsSoap">
<soap:address location="">
http://localhost/NML/CampaignSettings.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
regarding "Another question: why you use a temp
CampaignSettings variable in the getCompanyInfoById function?
Doesn´t it make sense to have the CampaignSettings
variable as member variable of the class (or as global member of
the app if you didn't use classes )" :
i am using the object of my webservice (object of the class
generated after importing WSDL) to invoke the webmethod.
Is there any other way for calling the webmethods.??
Also, the same code is working fine if i import the same
webservice in some other project, while its throwing the error in
this project.
Regards,
Shaveta
Maybe you are looking for
-
How can I host multiple domains on a single Mac?
It's actually a little more complicated than that. I have a site, let's call it site.com, and it's hosted just fine on my Mac Mini, accessible via the Internet and everything. I want to use the .co domain of my site, which is pointed to the same IP a
-
How do I reformat my Seagate Expansion external hard drive so I can use it for Mac
I recently purchased a 3TB Seagate® Expansion® external hard drive for PC. My plan is too reformat it so that I can use it, but it has been acting wierd on me. It says on Disk Utility that it is 4 gbs but I have a 3TB one. Im on OSX mavericks by the
-
None of the cross tabs are being exported to Excel
Hi All, I am experiencing a strange problem of export failing when any of the cross tab is exported. It comes out with a message, "An error occurred while trying to export the Worksheet. (Export failed.) " This is occuring in Plus and Viewer. But All
-
New Retina Macbook Pro - strange whining Sound
Hi, i just received my new Macbook Pro Retina - brilliant machine. But suddenly it starts to whine - I can hear the whining while sitting in front of the notebook, so its pretty loud. The sound does appear when I move windows or enter mission control
-
My battery drains in Mavericks instead of being boosted! Can anyone help?
I thought in Mavericks your battery life was supposed to last longer. Now that I have downloaded Mavericks, my battery drains considerably fast. I appreciate everyone's help, THANK YOU!