|
Good Morning John-
What is the URL (assume this is the
endpoint)? Where is the declaration for requestTransport (parameter to
sendReceive?)
You left out the last statement so we can see the String
representation of the response (which is
System.out.println(writer.toString); )
XML config files- My understanding is that you need do need Axis
configuration axis2.xml wrapped in aar (Axis Jar) to deploy to Working AXIS2
servlet code takes precedence over statically configured xml file
********************************************************************* This
email message and any files transmitted with it contain
confidential information intended only for the person(s) to whom this email
message is addressed. If you have received this email message in error,
please notify the sender immediately by telephone or email and destroy the
original message without making a copy. Thank you.
----- Original Message -----
Sent: Tuesday, July 11, 2006 9:31
AM
Subject: Re: [Axis2] Exception when
sending with ServiceClient
Martin,
The method that I am calling is correct. It is not sendAndRecieve()
as you were thinking. The API docs state online as well as in my IDE
state the method is sendRecieve(). Also, I have correctly instantiated
The ServiceClient object correctly. I am also setting the options on the
object. Sample code is below from the class that I have written.
Options options = new
Options(); options.setTo(new
EndpointReference(url.toString())); options.setProperty(MessageContextConstants.CHUNKED,
Constants.VALUE_FALSE); options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
ServiceClient sender = new
ServiceClient(); sender.setOptions(options); //
Blocking invocation QName q = new
QName(requestElement.getNamespace().getName(), requestElement.getLocalName()
,
requestElement.getNamespace().getPrefix()); sender.engageModule(q); responseElement
=
sender.sendReceive(requestElement); sender.disEngageModule(new
QName(requestElement.getNamespace().getName(), requestElement.getLocalName()
, requestElement.getNamespace().getPrefix())); StringWriter
writer = new
StringWriter(); responseElement.serialize(XMLOutputFactorynewInstance().createXMLStreamWriter( writer)); writer.flush();
The one question that I do have is since I am only using Axis to
formulate the SOAP wrapper, not performing full-blown webservices, do I need
config files in my webapp: axis2.xml, services.xml, and
module.xml??
Thanks for all of your continued help on this matter with me!
John
>>> [EMAIL PROTECTED] 07/10/06 4:40 PM
>>>
Going up the call stack
check 2 things -check spelling on serviceClient.sendReceive() I think
you may have mis-spelled the method name -as you are experiencing errors in
both sendReceive and engageodule() methods make sure you have properly
instantiated serviceClient beforehand
check the ServiceClient sender = new ServiceClient() for
null
Martin--
********************************************************************* This
email message and any files transmitted with it contain
confidential information intended only for the person(s) to whom this email
message is addressed. If you have received this email message in
error, please notify the sender immediately by telephone or email and
destroy the original message without making a copy. Thank you.
----- Original Message -----
Sent: Monday, July 10, 2006 4:28
PM
Subject: Re: [Axis2] Exception when
sending with ServiceClient
Martin,
When I have decompiled the code (via Eclipse plugin), it is in the
attached message. But I cannot say for sure since Eclipse is not
giving me line numbers. When I paste the code into a text editor and
goto that line, its a different method all together. I've copied the
method and attached in the email. Any suggestions??
John-
Can we see AxisService..line 395 specifically
Thanks M-
********************************************************************* This
email message and any files transmitted with it contain
confidential information intended only for the person(s) to whom this
email message is addressed. If you have received this email message
in error, please notify the sender immediately by telephone or email and
destroy the original message without making a copy. Thank
you.
----- Original Message -----
Sent: Monday, July 10, 2006 2:24
PM
Subject: Re: [Axis2] Exception when
sending with ServiceClient
Martin,
When I tried adding the engageMode() method that you were inquiring
about, the following exception was thrown: - John
Module not found
org.apache.axis2.description.AxisService.engageModule(AxisService.java:395)
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:279)
com.alliantenergy.soap.SoapClient.sendRecieve(SoapClient.java:105)
com.alliantenergy.soap.SoapClient.sendSoapMsg(SoapClient.java:80)
com.alliantenergy.soap.SoapClient.postSoapMessage(SoapClient.java:37)
org.apache.jsp.ProcessSOAPMessage_jsp._jspService(ProcessSOAPMessage_jsp.java:148)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:256)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:191)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
java.lang.Thread.run(Thread.java:536)
>>> [EMAIL PROTECTED] 07/10/06 10:02 AM
>>>
Martin,
Could you give an example of what you mean? I'm a little unsure
of what the parameter should be for the engageModule() method?
John
>>> [EMAIL PROTECTED] 07/10/06 9:35 AM
>>>
Good Morning John-
Sounds like perhaps a double submit
Did you try to limit execution scope engageModule perform
sendAndReceive and then disengageModule ??
Martin --
********************************************************************* This
email message and any files transmitted with it contain
confidential information intended only for the person(s) to whom this
email message is addressed. If you have received this email
message in error, please notify the sender immediately by telephone or
email and destroy the original message without making a copy.
Thank you.
----- Original Message -----
Sent: Monday, July 10, 2006 10:14
AM
Subject: [Axis2] Exception when
sending with ServiceClient
Good Morning,
Has anyone seen this exception when trying to perform a
sendRecieve() on the ServiceClient object?? It would be greatly
appreciated if I could get this resolved.
John
06 Jul 2006 15:54:40 [ProcessSOAPMessage$jsp] ERROR soap
- Can not output XML declaration, after other output has already been
done.; nested exception is:
javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.; nested exception
is: org.apache.axis2.AxisFault: Can not output XML
declaration, after other output has already been done.; nested exception
is: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been
done.
--------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail:
[EMAIL PROTECTED]
|