craig mclellen

Greenhorn
+ Follow
since Feb 19, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by craig mclellen

Hi Peer,

Sorry, it probably seemed that I mispelt it, but the dash is there. I've since learnt to format the xml in coderanch ;) to make it a little more legible. I've run the same piece of code again and captured the output - below is the result. I've also appended the java source incase you are able to pickup something I may be missing.



The java source


Thanks again Peer for your help with this, I'm extrememly desperate, and truly appreciate your time.
15 years ago
Hi Peer,

Thanks again for your reply, and sorry for the late response, I've only now managed to log onto my machine and saw your reply. I had tried what you mentioned but strangely, it's still not working - this is the response I'm getting.

<code>
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; action="http://www.w3.org/2005/08/addressing/soap/fault";charset=utf-8
Transfer-Encoding: chunked
Date: Sun, 01 Mar 2009 19:23:16 GMT
Connection: close

1ba
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns3="http://www.w3.org/2003/05/soap-envelope"><soapenv:Code><soapenv:Value>axis2ns3:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">Parameter out of range</soapenv:Text></soapenv:Reason><soapenv:Detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
0
</code>

Thanks again Peer.
Eagerly awaiting your response.
Kindest regards,
Craig
15 years ago
Excellent, thank you so much Peer.

I'm using SOAP 1.2. I've then replaced the code I had before with
<code>
resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
throw new org.apache.axis2.AxisFault("Parameter out of range",new javax.xml.namespace.QName( "http://www.w3.org/2002/12/soap-envelope","Sender" ) );
</code>

but still getting a 500 error as below - do you know what I may be doing wrong?

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; action="urn:helloException";charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 27 Feb 2009 14:23:01 GMT
Connection: close

1ba
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns7="http://www.w3.org/2002/12/soap-envelope"><soapenv:Code><soapenv:Value>axis2ns7:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">Parameter out of range</soapenv:Text></soapenv:Reason><soapenv:Detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
0
15 years ago
Hi,
Is it possible to have the status code of the response to an axis web service request set to 400 while still having the soap fault in the payload? Could you provide me with the code as the code below does not do the trick .
<code>
MessageContext faultMsgCtx = MessageContextBuilder.createFaultMessageContext(msgCtx, excep);
resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
Engine.sendFault(faultMsgCtx);
servlet.destroy();
</code>

Thanks, and much appreciated.
Kindest regards,
Craig
15 years ago
Hi,

I'm trying to call a web method that is expected to take 1min 10sec to complete, but ServiceClient invoke method is timing out after 15 seconds when running in a TomCat 5.5 container, but not when running as a junit test. When running as a junit test, the ServiceClient waits long enough (1min 10 sec) for the web method to return a result. I thought it may have been an issue with TomCat 5.5, so I then installed v6, but the app still timedout after 15 seconds under TomCat v6. The app is a web service using Axis2 v1.3. I'm using jdk 5.

These are the options I've set on my ServiceClient instance:
options.setTimeOutInMilliSeconds(120000);
options.setProperty(HTTPConstants.SO_TIMEOUT, 120000);
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 120000);
options.setCallTransportClieanup(true);

These are the settings in my axis2.xml file:
ConfigContextTimeoutInterval=35000
requestTimeout=45000 (within the transportReceiver element)

These are the settings in my server.xml file under ${TOMCAT_HOME}/conf
connectionTimeout=55000 (within the Connector element)

I've run out of ideas as to what I could try next to get this web method call from timing out before 2 minutes.
I would really appreciate any help in getting this sorted.
Thanks,
Cheers,
Craig
16 years ago
Hi,
I'm having trouble in my web service client I've written, and although TCPMon shows the correct request and response to/from the web service, it seems an InstantiationException exception occurs on deserializing the soap response. The DefaultObjectSupplier is trying to instantiate the interface instead of the class implementing the interface.
Would appreciate any help.
Thank you.
16 years ago
@XmlTransient seemed to do the trick, but please, if you know of any other better solution to this problem, would really appreciate your input.
16 years ago
Hi,
I'm having trouble in my web service client I've written, and although TCPMon shows the correct request and response going to/coming from the web service, it seems an InstantiationException exception occurs on deserializing the soap response. The class it's trying to deserialize implements the org.acegisecurity.userdetails.UserDetails class which has a property org.acegisecurity.GrantedAuthority[] getAuthorities which seems to be where the problem is. The base exception is "java.lang.InstantiationException: org.acegisecurity.GrantedAuthority". Is there some annotation I can use on my class to ignore this property on serialization/deserialization? Or does anyone have a solution to this problem?
Thanks and much appreciated,
16 years ago
Hi,
I have deployed a web service in Tomcat. When I try to retrieve the WSDL, I get the following message:
------------------
AXIS error
Could not generate WSDL!
There is no SOAP service at this location
------------------
e.g. when i try to access the URL http:\\myhost:8080\webservices\services, I am able to see the names of web methods deployed.... But when I click on the WSDL link given beside that URL I get the error message above.
Can anyone help me with this?

Thank you,
Craig
17 years ago