RE: Consuming a Service that takes AnyType

2009-11-21 Thread Meenakshisundaram, Pattabiraman
Thanks. As I am using the stub generated from the WSDL, I would be setting only 
the 'lookRequestDoc' in your example. I guess the generated Stub does this on 
our behalf.
I tried stringToOm only on the String payload but am getting 'Not serializable' 
 exception.
Thanks




From: McCoy, Daniel (HTSC) [mailto:daniel.mc...@htsco.com]
Sent: Friday, November 20, 2009 4:05 PM
To: axis-user@ws.apache.org
Subject: RE: Consuming a Service that takes AnyType

Convert your request string to an OMElement. Let axis handle the OMElement 
instead of the string.


String XMLRequest = 
soapEnvelope+soapBody+lookRequestDoc.xmlText()+soapBodyClose+soapEnvClose;

OMElement elem = AXIOMUtil.stringToOM(XMLRequest);


Dan McCoy
Architect
Office of the CTO
8 Farms Springs
Farmington, CT 06032
(860) 409-8170
daniel.mc...@thehartford.com



From: Meenakshisundaram, Pattabiraman 
[mailto:pattabiraman.meenakshisunda...@chartisinsurance.com]
Sent: Friday, November 20, 2009 3:56 PM
To: axis-user@ws.apache.org
Subject: Consuming a Service that takes AnyType

Hi,
I am using the Stub generated by WSDL2Java for a Service that takes AnyType.
The Service is expecting a Xml content ( Not a String/escaped). When I invoke 
the service through XmlSpy, it works. I used TCP Monitor to see the content 
transferred and I see that the tags are not escaped.
Do not know how to do the same thing with the Generated Client. I am passing it 
as a String. It is not working. Moreover, I notice that only the '<' is 
escaped. The > goes unescaped.

Could anyone help me resolve this.

Thanks




This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential and/or privileged 
information.  If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited.  If you are 
not the intended recipient, please notify the sender immediately by return 
e-mail, delete this communication and destroy all copies.




Re: Problems when calling getOMElement

2009-11-21 Thread Håkon Sagehaug
Hi

I'll try on monday, thanks for the help

cheers, Hakon

2009/11/20 Andreas Veithen 

> Can you test this with a snapshot version?
>
> Andreas
>
> 2009/11/20 Håkon Sagehaug :
> > hi
> >
> > The problem is occurs using 1.4 and axiom 1.2.8. I can extract the values
> > using the java objects, but when I use the #getOmElement() I get the just
> > the XML without values, so my thought was the serialization or something
> > like this.
> >
> > cheers, Hakon
> >
> > 2009/11/20 Andreas Veithen 
> >>
> >> Does this problem occur with snapshot versions of Axis2 and Axiom?
> >>
> >> Andreas
> >>
> >> On Fri, Nov 20, 2009 at 16:11, Amila Suriarachchi
> >>  wrote:
> >> > here is a sample code
> >> >
> >> > InDict inDict = new InDict();
> >> > ArrayOfKeyValueOfstringstring arrayOfKeyValueOfstringstring =
> >> > new
> >> > ArrayOfKeyValueOfstringstring();
> >> > inDict.setInDict(arrayOfKeyValueOfstringstring);
> >> >
> >> > KeyValueOfstringstring_type0[] keyValueOfstringstring_type0 =
> >> > new
> >> > KeyValueOfstringstring_type0[1];
> >> > keyValueOfstringstring_type0[0] = new
> >> > KeyValueOfstringstring_type0();
> >> > keyValueOfstringstring_type0[0].setKey("One Element Array");
> >> > keyValueOfstringstring_type0[0].setValue("One Element Array");
> >> >
> >> >
> >> >
> >> >
> arrayOfKeyValueOfstringstring.setKeyValueOfstringstring(keyValueOfstringstring_type0);
> >> >
> >> > try {
> >> > OMElement omElement = inDict.getOMElement(InDict.MY_QNAME,
> >> > OMAbstractFactory.getOMFactory());
> >> > System.out.println("OMElement ==> " +
> omElement.toString());
> >> > } catch (ADBException e) {
> >> > e.printStackTrace();
> >> > }
> >> >
> >> > thanks,
> >> > Amila.
> >> >
> >> > On Fri, Nov 20, 2009 at 3:14 AM, Andreas Veithen
> >> > 
> >> > wrote:
> >> >>
> >> >> Håkon,
> >> >>
> >> >> I think you need to give a bit more context. What version of Axis2?
> >> >> What version of Axiom? Code snippet showing what you are trying to
> do,
> >> >> etc.
> >> >>
> >> >> Andreas
> >> >>
> >> >> 2009/11/19 Håkon Sagehaug :
> >> >> > Hi
> >> >> >
> >> >> > Anybody did this, go from adb object through a xslt transfomation?
> >> >> >
> >> >> > Or having problem getting values out from a XML message when the
> tyep
> >> >> > attribute is used for the data type of the element.
> >> >> >
> >> >> > cheers, Håkon
> >> >> >
> >> >> > 2009/11/18 Håkon Sagehaug 
> >> >> >>
> >> >> >> Hi
> >> >> >>
> >> >> >> To provide more information, we want to do xslt transformation to
> >> >> >> our
> >> >> >> generated client side object. And  as far as I know we need the
> >> >> >> OmElement of
> >> >> >> the generated type to do so, but when this don't give back the
> >> >> >> values
> >> >> >> just
> >> >> >> the XML with no values, there is not much to transform. So we need
> a
> >> >> >> hint on
> >> >> >> how this can be done.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> cheers, håkon
> >> >> >>
> >> >> >> 2009/11/18 Håkon Sagehaug 
> >> >> >>>
> >> >> >>> Hi all,
> >> >> >>>
> >> >> >>> Any tips on this. stange if it won't work?
> >> >> >>>
> >> >> >>> 2009/11/17 Håkon Sagehaug 
> >> >> 
> >> >>  Hi all,
> >> >> 
> >> >>  I've got a client that calls a ws and using adb as the
> >> >>  databinding(client side), then we want to get a string
> >> >>  representation
> >> >>  of the
> >> >>  obejct.  We execute object.getOMElement(), the method returns
> only
> >> >>  the xml
> >> >>  element and not the actual value inside the element. So this
> >> >>  element
> >> >>  here
> >> >> 
> >> >> blastp
> >> >> 
> >> >>  Would returns this string
> >> >> 
> >> >>  
> >> >> 
> >> >>  We where wondering if it had anything to to with the xsi:type
> >> >>  attribute?
> >> >>  Any tips on how to solve this, or another way of getting a
> string
> >> >>  representatioon of the object using adb as the databinding?
> >> >> 
> >> >>  cheers, Håkon
> >> >> 
> >> >>  --
> >> >>  Håkon Sagehaug, Scientific Programmer
> >> >>  Parallab, Bergen Center for Computational Science (BCCS)
> >> >>  UNIFOB AS (University of Bergen Research Company)
> >> >>  hakon.sageh...@bccs.uib.no, phone +47 55584125
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> --
> >> >> >>> Håkon Sagehaug, Scientific Programmer
> >> >> >>> Parallab, Bergen Center for Computational Science (BCCS)
> >> >> >>> UNIFOB AS (University of Bergen Research Company)
> >> >> >>> hakon.sageh...@bccs.uib.no, phone +47 55584125
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Håkon Sagehaug, Scientific Programmer
> >> >> >> Parallab, Bergen Center for Computational Science (BCCS)
> >> >> >> UNIFOB AS (University of Bergen Research Company)
> >> >> >> hakon.sageh...@bccs.uib.no, phone +47 55584125
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Håkon Sagehaug, Scientifi

Re: Trouble upgrading Maven pom from Axis2 1.4.1 to 1.5.1

2009-11-21 Thread Glen Mazza

No response yet.  Has anyone been able to run axis2-wsdl2code-maven-plugin
with Axis 1.5.1?  I need to know how to upgrade my Axis2 1.4.1 pom.xml below
to work with it.

Thanks,
Glen


Glen Mazza wrote:
> 
> Hello, the pom.xml for the Axis2 SOAP client below works fine with
> axis2.version property set to 1.4.1:
> http://www.jroller.com/gmazza/entry/soap_client_with_axis2 
> (pom is under Step #4)
> 
> I'm having trouble, however, upgrading it to either Axis2 1.5 or 1.5.1. 
> When I try axis2.version = 1.5.1, and run mvn clean install, I get the
> following error:
> 
> [INFO] Internal error in the plugin manager executing goal
> 'org.apache.axis2:axi
> s2-wsdl2code-maven-plugin:1.5.1:wsdl2code': Unable to load the mojo
> 'org.apache.
> axis2:axis2-wsdl2code-maven-plugin:1.5.1:wsdl2code' in the plugin
> 'org.apache.ax
> is2:axis2-wsdl2code-maven-plugin'. A required class is missing:
> org/apache/axis2
> /wsdl/codegen/CodeGenerationException
> org.apache.axis2.wsdl.codegen.CodeGenerationException
> 
> Earlier in the Maven output I get other errors such as these:
> 
> C:\research\zipcode>mvn install
> [INFO] Scanning for projects...
> [INFO]
> 
> [INFO] Building Sample SOAP Client
> [INFO]task-segment: [install]
> [INFO]
> 
> [WARNING] POM for 'org.apache.axis2:axis2-jaxbri:pom:1.5.1:compile' is
> invalid.
> 
> Its dependencies (if any) will NOT be available to the current build.
> [WARNING] POM for 'org.apache.axis2:axis2-codegen:pom:1.5.1:runtime' is
> invalid.
> 
> 
> Its dependencies (if any) will NOT be available to the current build.
> [WARNING] POM for 'org.apache.axis2:axis2-kernel:pom:1.5.1:runtime' is
> invalid.
> 
> Its dependencies (if any) will NOT be available to the current build.
> [WARNING] POM for 'org.apache.axis2:axis2-adb:pom:1.5.1:runtime' is
> invalid.
> 
> Its dependencies (if any) will NOT be available to the current build.
> [WARNING] POM for 'org.apache.axis2:axis2-adb-codegen:pom:1.5.1:runtime'
> is inva
> lid.
> 
> Its dependencies (if any) will NOT be available to the current build.
> [WARNING] POM for 'org.apache.axis2:axis2-java2wsdl:pom:1.5.1:runtime' is
> invali
> d.
> 
> ...
> 
> Any clue what the problem might be?
> 
> Thanks,
> Glen
> 

-- 
View this message in context: 
http://old.nabble.com/Trouble-upgrading-Maven-pom-from-Axis2-1.4.1-to-1.5.1-tp26402018p26456451.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: axis2 maven plugin java2wsdl problem

2009-11-21 Thread Glen Mazza

Here's my pom.xml, if that might help:
http://www.jroller.com/gmazza/entry/soap_client_with_axis2

Unfortunately it only works for 1.4.1 right now, as I'm having trouble
getting the dependencies right for 1.5.1.

Glen


flyabovesun wrote:
> 
> I always got error:
>  The plugin 'org.apache.maven.plugins:maven-java2wsdl-plugin' does not
> exist
> or no valid version could be found
> with my plugin:
> 
> org.apache.axis2.maven2
> axis2-java2wsdl-maven-plugin
> 1.1
> 
> 
> com.chg.dataware.service.DatawareWebService
> 
> ${basedir}/src/main/resources/dataware.wsdl
> 
> 
>   
> 
>   java2wsdl
> 
>   
>  
>   
> I can find that jar file in repo1.maven.org/maven2 repository.
> 
> 
> -- 
> Haipeng Du
> Salt Lake City
> 
> 

-- 
View this message in context: 
http://old.nabble.com/axis2-maven-plugin-java2wsdl-problem-tp26416388p26456419.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Axis 2: Transport error: 404 Error: Not Found

2009-11-21 Thread Gonzalo Floria
In this trace you can see the request and the response. I can't trace what
they are getting, since I dont have access, but using SOAPUI the web service
works perfect.
Do you see where the problem may be?
Im using Axis 2 1.5.1.



DEBUG [Nov 21 2009 09:49:51]: Start getContentType: OMOutputFormat [
mimeBoundary =null rootContentId=null doOptimize=false doingSWA=false
isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null contentType=null
ignoreXmlDeclaration=false autoCloseWriter=false actionProperty=null
optimizedThreshold=0]
DEBUG [Nov 21 2009 09:49:51]: getContentType= {application/soap+xml}
OMOutputFormat [ mimeBoundary =null rootContentId=null doOptimize=false
doingSWA=false isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null
contentType=application/soap+xml ignoreXmlDeclaration=false
autoCloseWriter=false actionProperty=null optimizedThreshold=0]
DEBUG [Nov 21 2009 09:49:51]: contentType from the OMOutputFormat
=application/soap+xml
DEBUG [Nov 21 2009 09:49:51]: contentType returned =application/soap+xml;
charset=UTF-8; action="http://htng.org/1.1/Listener.Wsdl#Ping";
DEBUG [Nov 21 2009 09:49:52]: HttpConnectionManager.getConnection:  config =
HostConfiguration[host=http://my.hot-sos.net], timeout = 3
DEBUG [Nov 21 2009 09:49:52]: Allocating new connection,
hostConfig=HostConfiguration[host=http://my.hot-sos.net]
DEBUG [Nov 21 2009 09:49:52]: Open connection to my.hot-sos.net:80
DEBUG [Nov 21 2009 09:49:52]: >> "POST /HTNGListener/HTNGListener.asmx
HTTP/1.1[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: Adding Host request header
DEBUG [Nov 21 2009 09:49:52]: >> "Content-Type: application/soap+xml;
charset=UTF-8; action="http://htng.org/1.1/Listener.Wsdl#Ping"[\r][\n]";
DEBUG [Nov 21 2009 09:49:52]: >> "User-Agent: Axis2[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "Host: my.hot-sos.net[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "Transfer-Encoding: chunked[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: start writeTo()
DEBUG [Nov 21 2009 09:49:52]:   preserve=false
DEBUG [Nov 21 2009 09:49:52]:   isOptimized=false
DEBUG [Nov 21 2009 09:49:52]:   isDoingSWA=false
DEBUG [Nov 21 2009 09:49:52]: MTOM optimized Threshold value =0
DEBUG [Nov 21 2009 09:49:52]: OutputStream =class
org.apache.commons.httpclient.ChunkedOutputStream
DEBUG [Nov 21 2009 09:49:52]: OMFormat = OMOutputFormat [ mimeBoundary =null
rootContentId=null doOptimize=false doingSWA=false isSOAP11=false
charSetEncoding=UTF-8 xmlVersion=null contentType=application/soap+xml
ignoreXmlDeclaration=false autoCloseWriter=false actionProperty=null
optimizedThreshold=0]
DEBUG [Nov 21 2009 09:49:52]: About to create XMLOutputFactory
implementation with classloader=sun.misc.launcher$appclassloa...@11b86e7
DEBUG [Nov 21 2009 09:49:52]: The classloader for
javax.xml.stream.XMLOutputFactory is: null
DEBUG [Nov 21 2009 09:49:52]: Created XMLOutputFactory = class
com.sun.xml.internal.stream.XMLOutputFactoryImpl for
classloader=sun.misc.launcher$appclassloa...@11b86e7
DEBUG [Nov 21 2009 09:49:52]: Size of XMLOutputFactory map =1
DEBUG [Nov 21 2009 09:49:52]: XMLStreamWriter is
com.sun.xml.internal.stream.writers.XMLStreamWriterImpl
DEBUG [Nov 21 2009 09:49:52]: Calling MTOMXMLStreamWriter.flush
DEBUG [Nov 21 2009 09:49:52]: end writeTo()
DEBUG [Nov 21 2009 09:49:52]: >> "a0[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "http://www.w3.org/2003/05/soap-envelope
">"
DEBUG [Nov 21 2009 09:49:52]: >> "[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "0"
DEBUG [Nov 21 2009 09:49:52]: >> "[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: >> "[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: Request body sent
DEBUG [Nov 21 2009 09:49:52]: << "HTTP/1.1 404 Not Found[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "HTTP/1.1 404 Not Found[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "Content-Length: 103[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "Content-Type: text/html[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "Date: Sat, 21 Nov 2009 08:49:52
GMT[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "Connection: close[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]: << "[\r][\n]"
DEBUG [Nov 21 2009 09:49:52]:
getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)
DEBUG [Nov 21 2009 09:49:52]: loadBundle: Ignoring MissingResourceException:
Can't find bundle for base name org.apache.axis2.resource, locale en_US
DEBUG [Nov 21 2009 09:49:52]: Created org.apache.axis2.i18n.resource, linked
to parent null
DEBUG [Nov 21 2009 09:49:52]:
getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)
DEBUG [Nov 21 2009 09:49:52]:
org.apache.axis2.i18n.resource::handleGetObject(transportError)
INFO  [Nov 21 2009 09:49:52]: Unable to sendViaPost to url[
http://my.hot-sos.net/HTNGListener/HTNGListener.asmx]
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java