Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Axis jar to pass parameters to .net web service  RSS feed

 
Linda Pan
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've created a process where string parameters are passed to a web service using Apache Axis jar files. This works perfectly unless there's an apostrophe in one of the parameters then Axis gives an error (see error below). How can I fix this? I've tried to encode the string parameters and that works because fox example, I get "Benil%20O%27Brien." for a string parameter of "Benil O'Brien." But then it gets saved to SQL with the string still encoded.


05/13/2009 04:20:57 PM Agent error: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Incorrect syntax near 's'.
Unclosed quotation mark after the character string ''.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(Sq
05/13/2009 04:20:57 PM Agent error: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Incorrect syntax near 's'.
Unclosed quotation mark after the character string ''.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarnin
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.Call.invoke(Call.java:2767)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.Call.invoke(Call.java:2443)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.Call.invoke(Call.java:2366)
05/13/2009 04:20:57 PM Agent error: at org.apache.axis.client.Call.invoke(Call.java:1812)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!