RE: Cannot load SchemaTypeSystem

2009-10-08 Thread Schalk
Awesome Michael,

That did the job, in my case I had to copy it to the build directory as it
is a web app but it worked perfectly. Now though I encountered a lovely
surprise, a NullPointerException thrown by one of the generated stubs,
specifically this line:

_messageContext.getTransportOut().getSender().cleanup(_messageContext);

I will add some log statements in here but I am guessing it is
_messageContext. I now the stub had various constructors and for some of
these if you only provide the end point it sets the other, which I believe
is this _messageContext to null, not sure why those constructors exist then
if you should not really be using them, or am I missing something?

--
Kind Regards
Schalk Neethling

-Original Message-
From: FRYARS, Michael [mailto:fryar...@gmail.com] 
Sent: 08 October 2009 10:06 PM
To: axis-user@ws.apache.org
Subject: Re: Cannot load SchemaTypeSystem

In among all those .xsb files you'll find a single .class file, and this 
.class must be available at runtime.  [Note: XMLBeans generates the 
.class directly, it doesn't generate a .java and then have it compiled]

I saw the problem you describe when running JUnit tests which used an 
axis2-generated SOAP client. The AAR deployed in the axis2 WAR was fine. 
But the (eclipse) project that held the tests didn't have this XMLBeans 
.class file in the 'bin' directory. It was present in the 'resource' 
directory, which was the target directory for XMLBeans generated source, 
but it wasn't copied to the bin directory and so wasn't available to the 
test client at runtime. Simply copying it across to the bin directory 
solved the problem.

Regards,


Michael


sch...@afrigis.co.za a écrit :
> Hi there Christian,
>
> I did find the resource folder with stacks of .xsb files on. I added this
to
> the sources in the build path in Eclipse as well as to the Output... tab.
> However, I still get the problem, any ideas as to where else I need to set
> something? Maybe something to do with Tomcat? Thanks for your help.
>
> --
> Kind Regards
> Schalk Neethling
>
> -Original Message-
> From: Christian Gosch [mailto:christian.go...@inovex.de] 
> Sent: 08 October 2009 02:13 PM
> To: axis-user
> Subject: RE: Cannot load SchemaTypeSystem
>
> XMLbeans does not only generate classes, but lots of additional 
> binaries, which must be presesnt on the classpath.
>
> Look through your output folder, and you will find an additional folder 
> with this stuff.
>
> Add it to your runtime classpath, and you may be done :-)
>
> --cg
>
>   
>> -Original Message-
>> From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za]
>> Sent: Thursday, October 08, 2009 12:29 PM
>> To: axis-user@ws.apache.org
>> Subject: Cannot load SchemaTypeSystem
>>
>> Hi there,
>>
>> I finally got Axis2 to generate the appropriate stubs etc for me, 
>> 
> finally
>   
>> having to use the command line tool, and I chose XMLBeans as my data
>> binding
>> solution as I have worked with it before and found it real easy to 
>> 
> use.
>   
>> After having to hunt around for some jar files I can finally run a 
>> 
> servlet
>   
>> to test out the generated code.
>>
>> I start of the servlet with the following:
>> GetPointsByRadiusDocumentImpl pointsByRadius = new
>> GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type);
>>
>> However, when running the servlet I get the exception mentioned above 
>> 
> i.e.
>   
>> java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to 
>> 
> load
>   
>> class with name
>>
>> 
> schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS
> ys
>   
>> te
>> mHolder. Make sure the generated binary files are on the classpath.
>>
>> Any help will be much appreciated.
>>
>> Thanks!
>> Schalk
>>
>> AfriGIS e-mail facility may not be used for the distribution of chain
>> letters or offensive email. AfriGIS hereby distances itself from and
>> accepts no liability for the unauthorized use of its e-mail facility 
>> 
> or
>   
>> the sending of e-mail communications for other than strictly business
>> purposes. AfriGIS furthermore disclaims liability for any unauthorized
>> instruction for which permission was not granted. Required as per Sec 
>> 
> 50
>   
>> Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607.
>>
>>
>> !DSPAM:4acdbf1b326661199011006!
>>
>>
>> 
>
>
> AfriGIS e-mail facility may not be used for the distribution of chain
> letters or offensive emai

RE: Cannot load SchemaTypeSystem

2009-10-08 Thread Schalk
Hi there Christian,

I did find the resource folder with stacks of .xsb files on. I added this to
the sources in the build path in Eclipse as well as to the Output... tab.
However, I still get the problem, any ideas as to where else I need to set
something? Maybe something to do with Tomcat? Thanks for your help.

--
Kind Regards
Schalk Neethling

-Original Message-
From: Christian Gosch [mailto:christian.go...@inovex.de] 
Sent: 08 October 2009 02:13 PM
To: axis-user
Subject: RE: Cannot load SchemaTypeSystem

XMLbeans does not only generate classes, but lots of additional 
binaries, which must be presesnt on the classpath.

Look through your output folder, and you will find an additional folder 
with this stuff.

Add it to your runtime classpath, and you may be done :-)

--cg

> -Original Message-
> From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za]
> Sent: Thursday, October 08, 2009 12:29 PM
> To: axis-user@ws.apache.org
> Subject: Cannot load SchemaTypeSystem
> 
> Hi there,
> 
> I finally got Axis2 to generate the appropriate stubs etc for me, 
finally
> having to use the command line tool, and I chose XMLBeans as my data
> binding
> solution as I have worked with it before and found it real easy to 
use.
> 
> After having to hunt around for some jar files I can finally run a 
servlet
> to test out the generated code.
> 
> I start of the servlet with the following:
> GetPointsByRadiusDocumentImpl pointsByRadius = new
> GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type);
> 
> However, when running the servlet I get the exception mentioned above 
i.e.
> 
> java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to 
load
> class with name
> 
schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS
ys
> te
> mHolder. Make sure the generated binary files are on the classpath.
> 
> Any help will be much appreciated.
> 
> Thanks!
> Schalk
> 
> AfriGIS e-mail facility may not be used for the distribution of chain
> letters or offensive email. AfriGIS hereby distances itself from and
> accepts no liability for the unauthorized use of its e-mail facility 
or
> the sending of e-mail communications for other than strictly business
> purposes. AfriGIS furthermore disclaims liability for any unauthorized
> instruction for which permission was not granted. Required as per Sec 
50
> Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607.
> 
> 
> !DSPAM:4acdbf1b326661199011006!
> 
> 


AfriGIS e-mail facility may not be used for the distribution of chain
letters or offensive email. AfriGIS hereby distances itself from and accepts
no liability for the unauthorized use of its e-mail facility or the sending
of e-mail communications for other than strictly business purposes. AfriGIS
furthermore disclaims liability for any unauthorized instruction for which
permission was not granted. Required as per Sec 50 Companies Act 61 of 1973
Afrigis Pty LTD Reg No 1997/0067/1607.

AfriGIS e-mail facility may not be used for the distribution of chain letters 
or offensive email. AfriGIS hereby distances itself from and accepts no 
liability for the unauthorized use of its e-mail facility or the sending of 
e-mail communications for other than strictly business purposes. AfriGIS 
furthermore disclaims liability for any unauthorized instruction for which 
permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 
Afrigis Pty LTD Reg No 1997/0067/1607.



Cannot load SchemaTypeSystem

2009-10-08 Thread Schalk
Hi there,

I finally got Axis2 to generate the appropriate stubs etc for me, finally
having to use the command line tool, and I chose XMLBeans as my data binding
solution as I have worked with it before and found it real easy to use.

After having to hunt around for some jar files I can finally run a servlet
to test out the generated code.

I start of the servlet with the following:
GetPointsByRadiusDocumentImpl pointsByRadius = new
GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type);

However, when running the servlet I get the exception mentioned above i.e.

java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load
class with name
schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeSyste
mHolder. Make sure the generated binary files are on the classpath.

Any help will be much appreciated.

Thanks!
Schalk

AfriGIS e-mail facility may not be used for the distribution of chain letters 
or offensive email. AfriGIS hereby distances itself from and accepts no 
liability for the unauthorized use of its e-mail facility or the sending of 
e-mail communications for other than strictly business purposes. AfriGIS 
furthermore disclaims liability for any unauthorized instruction for which 
permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 
Afrigis Pty LTD Reg No 1997/0067/1607.



RE: axis wsdl not working with axis2

2009-10-02 Thread Schalk
I have the exact same issue. If you search on Google, you will find some bug 
reports related to this. Not sure whether it has been fixed as I am getting it 
with the latest 1.5 I believe version.

 

--

Kind Regards

Schalk Neethling

From: Bartolomeo Nicolotti [mailto:bnicolo...@siapcn.it] 
Sent: 02 October 2009 03:15 PM
To: axis-user@ws.apache.org
Cc: Marco Damilano; Livio Costamagna
Subject: axis wsdl not working with axis2

 

Hello,

we've generated a webservice and  related attached wsdl with axis(not 2) 
Eclipse 3.2.2 plugin.

The web service is receiving one string and returning 3 strings, very simple.

Then we've used axis2 wsdl2java to generate the client with:

wsdl2java.sh --noBuildXML -S ../../JavaSource -ns2p 
http://Servizi.Pratica.APWebServices=com.siap.APPraticaXmlClient  -uri 
./PraticaFromXml.wsdl

The request is correctly received from the server side, the response is 
received, as the sniffer report, by the client, but we got:

Thu Oct 01 15:13:11 CEST 
2009:generaPraticaDaRes.percProvvigioneTotale20091001151201403-1 caught an 
exception: 24442574 org.a
pache.axis2.AxisFault
 e.toString():org.apache.axis2.AxisFault: 
org.apache.axis2.databinding.ADBException: Unexpected subelement importaReturn,
 e.getMessage():org.apache.axis2.databinding.ADBException: Unexpected 
subelement importaReturn
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
com.siap.APPraticaXmlClient.PraticaFromXmlServiceStub.fromOM(PraticaFromXmlServiceStub.java:2200)
com.siap.APPraticaXmlClient.PraticaFromXmlServiceStub.importa(PraticaFromXmlServiceStub.java:191)
com.siap.TPUtility.TPPraticaAtlanteUtil.generaPraticaDaSIAPDocumentable(TPPraticaAtlanteUtil.java:56)
com.siap.DPKWebServices.Util.DynPkgOTAServiceUtil.generaPraticaDaSIAPDocumentable(DynPkgOTAServiceUtil.java:1001)
com.siap.DPKWebServices.OTAMessages.WSMH_OTA_HotelRes_Literal.handleMessage(WSMH_OTA_HotelRes_Literal.java:166)
com.siap.DPKWebServices.OTAMessages.WSMD_SerialSimple.dispatchWebService_Message(WSMD_SerialSimple.java:31)
com.siap.DPKWebServices.Util.DynPkgOTAServiceDispacher.dispatchWebService_Message_internals(DynPkgOTAServiceDispacher.java:15
3)
com.siap.DPKWebServices.Util.DynPkgOTAServiceDispacher.dispatchWebService_Message(DynPkgOTAServi

Analogous messages with

-d jaxbri
-d xmlbeans

and also with doc-literal, doc-wrapped, rpc-encoded servers. We've tried also 
with ASP.net and we got the same behaviour. 

The only client that worked was the one generated from the wsdl from axis(not2) 
Eclipse 3.2.2 plugin.

The problem seems that the response type 



is not recognized.

Could  someone have a look at the wsdl and tell us why?


Many thanks

Best regards


 
-- 
Bartolomeo Nicolotti
SIAP s.r.l.
www.siapcn.it
v.S.Albano 13 12049
Trinità(CN) Italy
ph:+39 0172 652553
centralino: +39 0172 652511
fax: +39 0172 652519






 <http://www.marbil.co.za> 




AfriGIS e-mail facility may not be used for the distribution of chain letters 
or offensive email. AfriGIS hereby distances itself from and accepts no 
liability for the unauthorized use of its e-mail facility or the sending of 
e-mail communications for other than strictly business purposes. AfriGIS 
furthermore disclaims liability for any unauthorized instruction for which 
permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 
Afrigis Pty LTD Reg No 1997/0067/1607. 

 


AfriGIS e-mail facility may not be used for the distribution of chain letters 
or offensive email. AfriGIS hereby distances itself from and accepts no 
liability for the unauthorized use of its e-mail facility or the sending of 
e-mail communications for other than strictly business purposes. AfriGIS 
furthermore disclaims liability for any unauthorized instruction for which 
permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 
Afrigis Pty LTD Reg No 1997/0067/1607.




RE: org.apache.axis2.databinding.ADBException WAS java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory

2009-10-01 Thread Schalk
Hi there,

 

I have seen some information on the this new issue and it seems to be
related to a bug. The httpcore jar solved my previous problem but now I am
getting:

 

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement Results

  at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

 

--

Kind Regards

Schalk Neethling

 

From: Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] 
Sent: 01 October 2009 04:02 PM
To: axis-user@ws.apache.org
Subject: Re: java.lang.ClassNotFoundException:
org.apache.http.HttpResponseFactory

 

 

On Thu, Oct 1, 2009 at 7:06 PM,  wrote:

Hi there everyone,

After struggling through some strange errors in the generated stubs I have
finally built my Axis2 project, however, when I try to make use of the Stub
everything goes perfect until it seems to want to make a connection to the
end point or reading the response. Here is the exception I get:

java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1387)
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1233)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   at
org.apache.axis2.transport.http.SimpleHTTPServer.init(SimpleHTTPServer.java:
116)
   at
org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
   at
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.j
ava:161)
   at
org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
   at
za.co.afrigis.ws.stubs.SpatialSearchStub.(SpatialSearchStub.java:100)

Any ideas? All help much appreciated.


Have you put your stub in your web app? 

you need to have httpcore-4.0.jar on the class path. 

thanks,
Amila. 


--
Kind Regards
Schalk Neethling






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/



RE: java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory

2009-10-01 Thread Schalk
Hi there Amila,

 

Yes I am testing via a servlet with everything running on Tomcat. I have
commons-httpclient-3.1.jar in WEB-INF/lib and thought that would do the
trick ;p Will add the jar you suggested and try again. Thanks!

 

--

Kind Regards

Schalk Neethling

From: Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] 
Sent: 01 October 2009 04:02 PM
To: axis-user@ws.apache.org
Subject: Re: java.lang.ClassNotFoundException:
org.apache.http.HttpResponseFactory

 

 

On Thu, Oct 1, 2009 at 7:06 PM,  wrote:

Hi there everyone,

After struggling through some strange errors in the generated stubs I have
finally built my Axis2 project, however, when I try to make use of the Stub
everything goes perfect until it seems to want to make a connection to the
end point or reading the response. Here is the exception I get:

java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1387)
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1233)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   at
org.apache.axis2.transport.http.SimpleHTTPServer.init(SimpleHTTPServer.java:
116)
   at
org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
   at
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.j
ava:161)
   at
org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
   at
za.co.afrigis.ws.stubs.SpatialSearchStub.(SpatialSearchStub.java:100)

Any ideas? All help much appreciated.


Have you put your stub in your web app? 

you need to have httpcore-4.0.jar on the class path. 

thanks,
Amila. 


--
Kind Regards
Schalk Neethling






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/



java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory

2009-10-01 Thread Schalk
Hi there everyone,

After struggling through some strange errors in the generated stubs I have
finally built my Axis2 project, however, when I try to make use of the Stub
everything goes perfect until it seems to want to make a connection to the
end point or reading the response. Here is the exception I get:

java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1233)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at
org.apache.axis2.transport.http.SimpleHTTPServer.init(SimpleHTTPServer.java:
116)
at
org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
at
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.j
ava:161)
at
org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
at
za.co.afrigis.ws.stubs.SpatialSearchStub.(SpatialSearchStub.java:100)

Any ideas? All help much appreciated.

--
Kind Regards
Schalk Neethling




Re: [Axis2] Weird error

2007-02-04 Thread Schalk Neethling

Greetings Thilina,

Yes, that is exactly what I did in the end and it also resolved the 
problem for me. Thanks!


Thilina Gunarathne wrote:

I also ran in to a similar problem sometime back.. Doing a full clean
& a rebuild in my IDE helped me to get out of it..

HTH,
Thilina

On 2/1/07, schalk <[EMAIL PROTECTED]> wrote:
Does anyone have any idea about the below? Any and all help much 
appreciated.


schalk wrote:
> Hi All,
>
> When running the following code:
>
> log.debug("Set AuthHeader elements...\n");
> DataServiceStub.AuthHeader authHeaderElements = new
> DataServiceStub.AuthHeader();
>
> 
authHeaderElements.setUserName(resources.getMessage("engenSOAPUsername", 
null,

> "NO_USERNAME", null));
>
>
authHeaderElements.setPassword(PasswordService.getInstance().encrypt(resources.getMessage("engenSOAPPassword", 


> null, "NO_PASSWORD", null)));
>
> log.debug("Adding header...\n");
> DataServiceStub.AuthHeader1 authHeader = new
> DataServiceStub.AuthHeader1();
> authHeader.setAuthHeader(authHeaderElements);
>
> log.debug("Adding SOAP Body elements...\n");
> DataServiceStub.Send soapBody = new DataServiceStub.Send();
> soapBody.setDataIdentifier("orderrequest");
> soapBody.setXmlData(mrequest.getStringParameter("e-Frame 
message"));

>
> log.debug("Send SOAP...\n");
> DataServiceStub.SendResponse resp = new 
DataServiceStub.SendResponse();

> try {
> log.debug("Instatiating DataServiceStub...\n");
> DataServiceStub dss = new DataServiceStub();
> resp = dss.Send(soapBody, authHeader);
> log.debug("SOAPHeader: " + authHeader + "\n");
> log.debug("SOAPBody: " + soapBody + "\n");
> } catch(AxisFault af) {
> log.error("AxisFault: " + af + "\n");
> }
>
> I get the following error:
>
> DEBUG  - [soap-service] - Reading data sent from EDI...
>
> DEBUG  - [soap-service] - Set AuthHeader elements...
>
> DEBUG  - [soap-service] - Adding header...
>
> DEBUG  - [soap-service] - Adding SOAP Body elements...
>
> DEBUG  - [soap-service] - Send SOAP...
>
> DEBUG  - [soap-service] - Instatiating DataServiceStub...
>
> ERROR  -
>
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cxws].[OrderProcessClient]] 


> - Servlet.service() for servlet OrderProcessClient threw exception
> java.lang.IncompatibleClassChangeError
> at
> 
za.co.cxchange.soap.engen.client.DataServiceStub.Send(DataServiceStub.java:107) 


> at
>
za.co.cxchange.soap.engen.client.OrderProcessClient.processRequest(OrderProcessClient.java:58) 


> at
>
za.co.cxchange.soap.engen.client.OrderProcessClient.doPost(OrderProcessClient.java:74) 


> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 


> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 


> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 


> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 


> at
> 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 


> at
> 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 


> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 


> at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 


> at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 


> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) 


> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 


> at
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 


> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 


> at java.lang.Thread.run(Thread.java:595)
>
> Any ideas? Appologies for all of the code.
>
> Thanks!
> Schalk
>
>
> --
> Open WebMail Project (http://openwebmail.org)
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] Web service extensions

2007-02-02 Thread schalk
Hi Everyone,

Can anyone point me in the right direction with regards to web service
extensions and Axis2.

Thanks
Schalk

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] Weird error

2007-02-01 Thread schalk
Does anyone have any idea about the below? Any and all help much appreciated.

schalk wrote:
> Hi All,
>
> When running the following code:
>
> log.debug("Set AuthHeader elements...\n");
> DataServiceStub.AuthHeader authHeaderElements = new
> DataServiceStub.AuthHeader();
>
> authHeaderElements.setUserName(resources.getMessage("engenSOAPUsername", null,
> "NO_USERNAME", null));
>
>
authHeaderElements.setPassword(PasswordService.getInstance().encrypt(resources.getMessage("engenSOAPPassword",
> null, "NO_PASSWORD", null)));
>
> log.debug("Adding header...\n");
> DataServiceStub.AuthHeader1 authHeader = new
> DataServiceStub.AuthHeader1();
> authHeader.setAuthHeader(authHeaderElements);
>
> log.debug("Adding SOAP Body elements...\n");
> DataServiceStub.Send soapBody = new DataServiceStub.Send();
> soapBody.setDataIdentifier("orderrequest");
> soapBody.setXmlData(mrequest.getStringParameter("e-Frame message"));
>
> log.debug("Send SOAP...\n");
> DataServiceStub.SendResponse resp = new 
> DataServiceStub.SendResponse();
> try {
> log.debug("Instatiating DataServiceStub...\n");
> DataServiceStub dss = new DataServiceStub();
> resp = dss.Send(soapBody, authHeader);
> log.debug("SOAPHeader: " + authHeader + "\n");
> log.debug("SOAPBody: " + soapBody + "\n");
> } catch(AxisFault af) {
> log.error("AxisFault: " + af + "\n");
> }
>
> I get the following error:
>
> DEBUG  - [soap-service] - Reading data sent from EDI...
>
> DEBUG  - [soap-service] - Set AuthHeader elements...
>
> DEBUG  - [soap-service] - Adding header...
>
> DEBUG  - [soap-service] - Adding SOAP Body elements...
>
> DEBUG  - [soap-service] - Send SOAP...
>
> DEBUG  - [soap-service] - Instatiating DataServiceStub...
>
> ERROR  -
>
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cxws].[OrderProcessClient]]
> - Servlet.service() for servlet OrderProcessClient threw exception
> java.lang.IncompatibleClassChangeError
> at
> za.co.cxchange.soap.engen.client.DataServiceStub.Send(DataServiceStub.java:107)
> at
>
za.co.cxchange.soap.engen.client.OrderProcessClient.processRequest(OrderProcessClient.java:58)
> at
>
za.co.cxchange.soap.engen.client.OrderProcessClient.doPost(OrderProcessClient.java:74)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:595)
>
> Any ideas? Appologies for all of the code.
>
> Thanks!
> Schalk
>
>
> --
> Open WebMail Project (http://openwebmail.org)
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] java.lang.IncompatibleClassChangeError

2007-01-31 Thread Schalk Neethling

Greetings All,

Has anyone seen this error before?

ERROR  -
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cxws].[OrderProcessClient]]
- Servlet.service() for servlet OrderProcessClient threw exception
java.lang.IncompatibleClassChangeError

This refers to the following code:
at
za.co.cxchange.soap.engen.client.DataServiceStub.Send(DataServiceStub.java:107):
This seems to be around this code:
public za.co.cxchange.soap.engen.client.DataServiceStub.SendResponse Send(

   za.co.cxchange.soap.engen.client.DataServiceStub.Send param3,
   za.co.cxchange.soap.engen.client.DataServiceStub.AuthHeader1 
param4)

   throws java.rmi.RemoteException

   {
   try {
   org.apache.axis2.client.OperationClient _operationClient = 
_serviceClient.createClient(_operations[0].getName());
   
_operationClient.getOptions().setAction("http://dataservice.com/Send";);
   
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);


at
za.co.cxchange.soap.engen.client.OrderProcessClient.processRequest(OrderProcessClient.java:58):
resp = dss.Send(soapBody, authHeader);

at
za.co.cxchange.soap.engen.client.OrderProcessClient.doPost(OrderProcessClient.java:74):
OrderProcessClient opc = new OrderProcessClient();
opc.setFileData(fileData);
opc.sendSOAP();

Any and all help will be very much appreciated. Thanks!
Schalk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] Weird error

2007-01-31 Thread schalk
Hi All,

When running the following code:

log.debug("Set AuthHeader elements...\n");
DataServiceStub.AuthHeader authHeaderElements = new
DataServiceStub.AuthHeader();
   
authHeaderElements.setUserName(resources.getMessage("engenSOAPUsername", null,
"NO_USERNAME", null));
   
authHeaderElements.setPassword(PasswordService.getInstance().encrypt(resources.getMessage("engenSOAPPassword",
null, "NO_PASSWORD", null)));

log.debug("Adding header...\n");
DataServiceStub.AuthHeader1 authHeader = new
DataServiceStub.AuthHeader1();
authHeader.setAuthHeader(authHeaderElements);

log.debug("Adding SOAP Body elements...\n");
DataServiceStub.Send soapBody = new DataServiceStub.Send();
soapBody.setDataIdentifier("orderrequest");
soapBody.setXmlData(mrequest.getStringParameter("e-Frame message"));

log.debug("Send SOAP...\n");
DataServiceStub.SendResponse resp = new DataServiceStub.SendResponse();
try {
log.debug("Instatiating DataServiceStub...\n");
DataServiceStub dss = new DataServiceStub();
resp = dss.Send(soapBody, authHeader);
log.debug("SOAPHeader: " + authHeader + "\n");
log.debug("SOAPBody: " + soapBody + "\n");
} catch(AxisFault af) {
log.error("AxisFault: " + af + "\n");
}

I get the following error:

DEBUG  - [soap-service] - Reading data sent from EDI...

DEBUG  - [soap-service] - Set AuthHeader elements...

DEBUG  - [soap-service] - Adding header...

DEBUG  - [soap-service] - Adding SOAP Body elements...

DEBUG  - [soap-service] - Send SOAP...

DEBUG  - [soap-service] - Instatiating DataServiceStub...

ERROR  -
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cxws].[OrderProcessClient]]
- Servlet.service() for servlet OrderProcessClient threw exception
java.lang.IncompatibleClassChangeError
at
za.co.cxchange.soap.engen.client.DataServiceStub.Send(DataServiceStub.java:107)
at
za.co.cxchange.soap.engen.client.OrderProcessClient.processRequest(OrderProcessClient.java:58)
at
za.co.cxchange.soap.engen.client.OrderProcessClient.doPost(OrderProcessClient.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Any ideas? Appologies for all of the code.

Thanks!
Schalk


--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis 2] setting transport to HTTPS

2007-01-22 Thread Schalk

Greetings everyone,

When setting options on my ServiceClient I use the following to set the 
transport protocol:

options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

My question is, is there a way to set your transport protocol to be HTTPS?

Thanks!
Schalk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] Reading the received SOAP envelope

2007-01-21 Thread Schalk

Greetings All,

I have an Axis2 web service that will be invoked by a .NET client. My 
question is, is there a tutorial or documentation somewhere that 
explains how to handle/read the incoming SOAP message?


This is the method I am exposing:

public OMElement processConfirmation(OMElement xmlData, String username, 
String password) throws XMLStreamException {


So I am assuming that the SOAP envelope will be loaded into xmlData, 
correct?


Thanks!
Schalk


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modifying Axis WAR file (Was Re: [Axis2 1.1.1] AAR file and web.xml)

2007-01-21 Thread Schalk

Hey Garth,

No, I reckon that if you need all applications under Tomcat to have 
access to DBCP access then adding that in Tomcat itself should be fine. 
However, if there is anything that is Axis/Web Service specific then it 
would be better to edit the web.xml under Axis for these settings as 
apposed to enforcing this on all application loaded by the container.


HTH
Schalk

Garth Keesler wrote:
Good info. It raises another question, however. If I am setting up 
DBCP for Tomcat, why does the config go in the web.xml for Axis and 
not Tomcat? Dumb question but does that mean that any servlet 
accessing the database via DBCP must run under Axis?


Just curious,
Garth

Ajith Ranabahu wrote:

Hi guys,
Here is a small description to de-mystify  this whole business of aars
and wars :)

The Axis2 war is a packaged version of the complete Axis2 setup, ready
to be deployed in a servlet container. aar files on the other hand are
archived service bundles that include class files, a descriptor file
called the services.xml and may be jar files needed by the service.
aar files go inside the Axis2 web app and cannot survive alone inside
a servlet container. There is NO web.xml inside the aar file. If there
is a reference to a web.xml that probably means the web.xml inside the
Axis2 war.

As far as your situation is considered I guess you should edit the
Axis2/WEB-INF/web.xml  that you'll find inside the tomcat webapps
directory. The web.xml inside the conf is a global setting and editing
that will enforce the same configuration to all the webapps running in
your server.

Ajith

On 1/21/07, Schalk <[EMAIL PROTECTED]> wrote:

No problem, pleasure Garth.

Garth Keesler wrote:
> I'm not sure what name you go by but, Schalk, you pointed me in the
> right direction! I modified the Tomcat web.xml file in the conf
> directory and now, at least, the errors I'm getting indicate that the
> database pooled connection was actually made. Now maybe I can make
> some progress.
>
> If I could assign points in this list, I'd give 'em to you. :-)
>
> Thanx much,
> Garth
>
> Schalk wrote:
>> Greetings,
>>
>> I am using Axis2 and have successfully edited the web.xml as well as
>> added .jar's to the lib without any problems.
>>
>> Glen Mazza wrote:
>>> Hello, I have a question--is the process of altering the web.xml
>>> file and adding JARs to the lib directory of the axis.war file to
>>> accomodate service classpath needs more or less the same in both
>>> Axis2 and Axis1? I think they would be, but the instructions I
>>> see[1] appear to be for Axis1, so I don't know if anything is
>>> substantially different for Axis2--not much is mentioned about
>>> altering the web.xml files or adding JARs to the WAR lib directory
>>> in the Axis2 docs[2].
>>>
>>> Thanks,
>>> Glen
>>>
>>> [1]
>>> 
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices 


>>>
>>> [2]
>>> 
http://ws.apache.org/axis2/1_1_1/installationguide.html#servlet_container 


>>>
>>>
>>>
>>> Schalk wrote:
>>>> Hey Garth,
>>>>
>>>> I am pretty sure you would need to edit the web.xml inside the 
axis

>>>> distribution. Your .aar file should go into the services directory
>>>> inside the axis distribution.
>>>>
>>>> Garth Keesler wrote:
>>>>
>>>>> I am attempting to deploy a web service that utilizes Database
>>>>> Connection Pooling (DBCP). The examples (both official Apache and
>>>>> unofficial) all discuss adding a  section to the
>>>>> /WEB-INF/web.xml file but I can find no examples of an .aar file
>>>>> that have a /WEB-INF directory or a web.xml file included. Where
>>>>> in the .aar file do I include the web.xml file?
>>>>>
>>>>> Thanx,
>>>>> Garth
>>>>>
>>>>>
>>>>>
>>>>> 
-

>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>>>> additional commands, e-mail: [EMAIL PROTECTED]
>>>>> 
 


>>>>>
>>>>>
>>>>> No virus found in this incoming message.
>>>>> Checked by AVG Free Edition.
>>>>> Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date:
>>>>> 1/20/2007 10:31 PM
>>>>>
>>>
>>> 

Re: Modifying Axis WAR file (Was Re: [Axis2 1.1.1] AAR file and web.xml)

2007-01-21 Thread Schalk

No problem, pleasure Garth.

Garth Keesler wrote:
I'm not sure what name you go by but, Schalk, you pointed me in the 
right direction! I modified the Tomcat web.xml file in the conf 
directory and now, at least, the errors I'm getting indicate that the 
database pooled connection was actually made. Now maybe I can make 
some progress.


If I could assign points in this list, I'd give 'em to you. :-)

Thanx much,
Garth

Schalk wrote:

Greetings,

I am using Axis2 and have successfully edited the web.xml as well as 
added .jar's to the lib without any problems.


Glen Mazza wrote:
Hello, I have a question--is the process of altering the web.xml 
file and adding JARs to the lib directory of the axis.war file to 
accomodate service classpath needs more or less the same in both 
Axis2 and Axis1? I think they would be, but the instructions I 
see[1] appear to be for Axis1, so I don't know if anything is 
substantially different for Axis2--not much is mentioned about 
altering the web.xml files or adding JARs to the WAR lib directory 
in the Axis2 docs[2].


Thanks,
Glen

[1] 
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices 


[2]
http://ws.apache.org/axis2/1_1_1/installationguide.html#servlet_container 




Schalk wrote:

Hey Garth,

I am pretty sure you would need to edit the web.xml inside the axis 
distribution. Your .aar file should go into the services directory 
inside the axis distribution.


Garth Keesler wrote:

I am attempting to deploy a web service that utilizes Database 
Connection Pooling (DBCP). The examples (both official Apache and 
unofficial) all discuss adding a  section to the 
/WEB-INF/web.xml file but I can find no examples of an .aar file 
that have a /WEB-INF directory or a web.xml file included. Where 
in the .aar file do I include the web.xml file?


Thanx,
Garth



- 
To unsubscribe, e-mail: [EMAIL PROTECTED] For 
additional commands, e-mail: [EMAIL PROTECTED]
 



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date: 
1/20/2007 10:31 PM
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


.



- 
To unsubscribe, e-mail: [EMAIL PROTECTED] For 
additional commands, e-mail: [EMAIL PROTECTED]



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date: 1/20/2007 10:31 
PM
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modifying Axis WAR file (Was Re: [Axis2 1.1.1] AAR file and web.xml)

2007-01-21 Thread Schalk

Greetings,

I am using Axis2 and have successfully edited the web.xml as well as 
added .jar's to the lib without any problems.


Glen Mazza wrote:
Hello, I have a question--is the process of altering the web.xml file 
and adding JARs to the lib directory of the axis.war file to 
accomodate service classpath needs more or less the same in both Axis2 
and Axis1? I think they would be, but the instructions I see[1] appear 
to be for Axis1, so I don't know if anything is substantially 
different for Axis2--not much is mentioned about altering the web.xml 
files or adding JARs to the WAR lib directory in the Axis2 docs[2].


Thanks,
Glen

[1] 
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices

[2]
http://ws.apache.org/axis2/1_1_1/installationguide.html#servlet_container


Schalk wrote:

Hey Garth,

I am pretty sure you would need to edit the web.xml inside the axis 
distribution. Your .aar file should go into the services directory 
inside the axis distribution.


Garth Keesler wrote:

I am attempting to deploy a web service that utilizes Database 
Connection Pooling (DBCP). The examples (both official Apache and 
unofficial) all discuss adding a  section to the 
/WEB-INF/web.xml file but I can find no examples of an .aar file 
that have a /WEB-INF directory or a web.xml file included. Where in 
the .aar file do I include the web.xml file?


Thanx,
Garth



- 
To unsubscribe, e-mail: [EMAIL PROTECTED] For 
additional commands, e-mail: [EMAIL PROTECTED]
 



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date: 
1/20/2007 10:31 PM
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2 1.1.1] AAR file and web.xml

2007-01-21 Thread Schalk

Hey Garth,

I am pretty sure you would need to edit the web.xml inside the axis 
distribution. Your .aar file should go into the services directory 
inside the axis distribution.


Garth Keesler wrote:
I am attempting to deploy a web service that utilizes Database 
Connection Pooling (DBCP). The examples (both official Apache and 
unofficial) all discuss adding a  section to the 
/WEB-INF/web.xml file but I can find no examples of an .aar file that 
have a /WEB-INF directory or a web.xml file included. Where in the 
.aar file do I include the web.xml file?


Thanx,
Garth



- 
To unsubscribe, e-mail: [EMAIL PROTECTED] For 
additional commands, e-mail: [EMAIL PROTECTED]



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date: 1/20/2007 10:31 
PM
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] Axis Fault

2007-01-19 Thread schalk
Greetings All,

What might cause the following error:

INFO  - [org.apache.commons.httpclient.HttpMethodBase] - Discarding unexpected
response: HTTP/1.1 100 Continue
INFO  - [org.apache.commons.httpclient.HttpMethodBase] - Response content
length is not known
ERROR  - [soap-service] - AxisFault Cause: HTTP Transport error : '400' - 'Bad
Request'; nested exception is: 
org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad 
Request';
nested exception is: 
org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad 
Request';
nested exception is: 
org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'

Thanks!
Schalk

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging from Web Service

2007-01-12 Thread Schalk

I import org.apache.log4j.Logger;

then Logger log = Logger.getLogger("soap-service");

log.debug("Converting StringBuffer to String...");

Wayne Johnson wrote:
I think the problem is I'm getting the SLF4 logger under the hood, and 
not log4j, so a log4j.properties file doesn't even get read.


How do you create your Log object?  LogFactory?

*/Schalk <[EMAIL PROTECTED]>/* wrote:

Greetings Wayne,

This is my log4j.properties and its placed at myapp\WEB-INF\classes\

I copied it over the default Axis .properties file and everything is
working fine for me.

#Set the level for the root logger to INFO and add its appender(s)
log4j.rootLogger=INFO, CONSOLE, LOGFILE

#Set my own logger
log4j.logger.soap-service=DEBUG, CONSOLE, LOGFILE
log4j.additivity.soap-service=false

#Setting appender for output to console.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d %p [%c] - <%m>%n

#Setting for the logfile
log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.File=C:/logs/error/soap/soap-service.log
log4j.appender.LOGFILE.MaxFileSize=512KB
# Keep three backup files.
log4j.appender.LOGFILE.MaxBackupIndex=3
# Pattern to output: priority NDC(remoteHost) MDC(remoteAddress)
[category] - message
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%p %x
-%X{remoteAddress}
[%c] - %m%n

Wayne Johnson wrote:
> I'm writing a Java Web Service to to user authentication for our
> applications. This is running under Jetty, which is started by the
> Tanuki service wrapper.
>
> I've got the web service somewhat working but I can't seem to get
> logging working. I've imported:
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> To the .jws program. Nothing comes out for the log.debug levels.
>
> It looks like LogFactory.getLog() is getting me a logger object for
> org.apache.commons.logging.impl.SLF4FLogFactory. I either need to
> figure out how to use that logger, or switch to the log4j logger
that
> I'm use to. I have log4j in the class path. According to the docs,
> that should be the priority logger.
>
> I tried setting the system property
>
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> but that doesn't seem to affect anything.
>
> I've tried creating a commons-logging.properties file in various
> places. Not exactly sure what needs to go in there, I currently
have
> org.apache.commons.logging.Log=log4j.
>
> Any hints anyone?
>
> Thanks.
>
>
>
> ---
> Wayne Johnson, | There are two kinds of people: Those
> 3943 Penn Ave. N. | who say to God, "Thy will be done,"
> Minneapolis, MN 55412-1908 | and those to whom God says, "All right,
> (612) 522-7003 | then, have it your way." --C.S. Lewis
>
>

> Expecting? Get great news right away with email Auto-Check.
>
> Try the Yahoo! Mail Beta.
>
>
>

>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.9/623 - Release Date:
1/11/2007 3:33 PM
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---
Wayne Johnson, | There are two kinds of people: Those
3943 Penn Ave. N.  | who say to God, "Thy will be done,"
Minneapolis, MN 55412-1908 | and those to whom God says, "All right,
(612) 522-7003 | then, have it your way." --C.S. Lewis


Don't be flakey. Get Yahoo! Mail for Mobile 
<http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> and
always stay connected 
<http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> to 
friends.



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.9/623 - Release Date: 1/11/2007 3:33 
PM
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging from Web Service

2007-01-12 Thread Schalk

Greetings Wayne,

This is my log4j.properties and its placed at myapp\WEB-INF\classes\

I copied it over the default Axis .properties file and everything is 
working fine for me.


#Set the level for the root logger to INFO and add its appender(s)
log4j.rootLogger=INFO, CONSOLE, LOGFILE

#Set my own logger
log4j.logger.soap-service=DEBUG, CONSOLE, LOGFILE
log4j.additivity.soap-service=false

#Setting appender for output to console.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d %p [%c] - <%m>%n

#Setting for the logfile
log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.File=C:/logs/error/soap/soap-service.log
log4j.appender.LOGFILE.MaxFileSize=512KB
# Keep three backup files.
log4j.appender.LOGFILE.MaxBackupIndex=3
# Pattern to output: priority NDC(remoteHost) MDC(remoteAddress) 
[category] - message

log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%p %x -%X{remoteAddress} 
[%c] - %m%n


Wayne Johnson wrote:
I'm writing a Java Web Service to to user authentication for our 
applications.  This is running under Jetty, which is started by the 
Tanuki service wrapper.


I've got the web service somewhat working but I can't seem to get 
logging working.  I've imported:

  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
To the .jws program.  Nothing comes out for the log.debug levels. 

It looks like LogFactory.getLog() is getting me a logger object for 
org.apache.commons.logging.impl.SLF4FLogFactory.  I either need to 
figure out how to use that logger, or switch to the log4j logger that 
I'm use to.  I have log4j in the class path.  According to the docs, 
that should be the priority logger. 

I tried setting the system property 
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

but that doesn't seem to affect anything.

I've tried creating a commons-logging.properties file in various 
places.  Not exactly sure what needs to go in there, I currently have 
org.apache.commons.logging.Log=log4j. 


Any hints anyone?

Thanks.



---
Wayne Johnson, | There are two kinds of people: Those
3943 Penn Ave. N.  | who say to God, "Thy will be done,"
Minneapolis, MN 55412-1908 | and those to whom God says, "All right,
(612) 522-7003 | then, have it your way." --C.S. Lewis


Expecting? Get great news right away with email Auto-Check. 

Try the Yahoo! Mail Beta. 
 




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.9/623 - Release Date: 1/11/2007 3:33 
PM
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SOAPException

2007-01-10 Thread schalk
Sorry to ask this question again but I cannot find any information on it. Does
anyone know what might cause the below exception? This happens when a .NET
client invokes my service. Thanks!

System.Web.Services.Protocols.SoapException:
org.apache.axiom.om.impl.llom.OMTextImpl

P.S. Should I ask this question on the dev list?

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SOAPException

2007-01-09 Thread schalk
Hi All,

I have a Java/Axis2 web service that is invoked by a .NET client. When the
client invokes the service I get the following error.

System.Web.Services.Protocols.SoapException:
org.apache.axiom.om.impl.llom.OMTextImpl

I did a quick search on Google for org.apache.axiom.om.impl.llom.OMTextImpl
but all I get is a page that states:
No usage of org.apache.axiom.om.impl.llom.OMTextImpl

This is at
http://ws.apache.org/commons/axiom/apidocs/org/apache/axiom/om/impl/llom/class-use/OMTextImpl.html

Does anyone have an idea of what could be causing this error? If I need to
post code or a WSDL or whatever please let me know.

Thanks!
Schalk

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Axis2 and .NET

2007-01-09 Thread schalk
Greetings All,

I am in the process of deploying my first web service using Axis2. So far
everything is going well. One question I have is, is there anything specific
that needs to be done on my end to allow a .NET web service to invoke my Axis2
web service. As far as I understand the nature of web services there should
not be but, I just want to be proactive about this and ask the question before
getting confronted with it.

Thanks!
Schalk

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to enable log4j logging in axis2

2007-01-01 Thread schalk
Yes, everything is there. All you need do is drop your log4j.properties file
into the classes directory and then you should be good to go.

> Someone please help me to setup log4j logging in axis2. Does the axis2.war 
> distribution include all the necessary jar to enable log4j logging?
> falom

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fwd: WSDL and OMElement problems

2006-12-28 Thread schalk
Thanks a million Paul, I will check it out and let you know my progress.

Paul Fremantle wrote:
> Hi
>
> I took your WSDL and ran it through the Eclipse WSDL validator and it
> found a number of bugs. I'm suprised because this WSDL looks like it
> was generated by Axis2. Did you hand edit it after?
>
> The main problems were namespace problems. I'm not exactly sure what
> you were aiming at for namespaces, but this attached WSDL is now
> valid.
>
> I then ran this fixed WSDL through WSDL2Java. I know you aren't using
> databinding, but if you pass the "no databinding" option (wsdl2java -d
> none), you get something pretty useful.
>
> This is the command I used:
> \axis2-1.1\bin\wsdl2java.bat -d none -uri confirmProcess.wsdl -ss -sd -o 
> outdir
>
> [Please note that the build file generated in this case is wrong - see
> https://issues.apache.org/jira/browse/AXIS2-1918, so I fixed it up by
> hand].
>
> I think this made me realize what your problem is. You have no actual
> message (the message is empty), so the result is that its looking for
> a method:
> public void processConfirmation()
>
> It looks like the error message you were getting is misleading.
> AxisFault Cause: ServiceClass does not implement required method of the form
> OMElement processConfirmation(OMElement e)
>
> It depends if you think void processConfirmation() is of the "form" above! :-)
>
> Anyway, when I build the skeleton and deployed it I could see the WSDL
> and it seemed to work. I've posted the (already built) code-genned
> directory and the fixed up WSDL  here:
> ftp://fremantle.org/schalk
>
> (I can't attach files to this mailing list).
>
>
>
> Paul
>
>
> On 12/28/06, schalk <[EMAIL PROTECTED]> wrote:
>> Hi Paul,
>>
>> Here is the services.xml
>>
>> 
>> Order processing web service. Currently implemented for
>> Engen.
>> >
name="ServiceClass">za.co.cxchange.soap.business.ConfirmationProcessService
>> 
>> > class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
>> urn:processConfirmation
>> 
>> 
>>
>> WSDL
>>
>> http://schemas.xmlsoap.org/wsdl/soap12/";
>> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
>> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
>> xmlns:types="http://localhost:8080/cxws/types";
>> xmlns:ns="http://localhost:8080/cxws/services/ConfirmationProcessService";
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>> targetNamespace="http://ws.myrelease.info";>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> > type="ns:ConfirmationProcessServicePortType">
>> http://schemas.xmlsoap.org/soap/http";
>> style="document" />
>> 
>> > style="document" />
>> 
>> >
>> namespace="http://localhost:8080/cxws/services/ConfirmationProcessService"; />
>> 
>> 
>> 
>> > type="ns:ConfirmationProcessServicePortType">
>> http://schemas.xmlsoap.org/soap/http";
>> style="document" />
>> 
>> > style="document" />
>> 
>> > namespace="http://localhost:8080/cxws/services/ConfirmationProcessService"; />
>> 
>> 
>> 
>> 
>> > binding="ns:ConfirmationProcessServiceSOAP11Binding">
>> >
>> location="http://localhost:8080/axis2/services/ConfirmationProcessService"; />
>> 
>> > binding="ns:ConfirmationProcessServiceSOAP12Binding">
>> >
>> location="http://localhost:8080/axis2/services/ConfirmationProcessService"; />
>> 
>> 
>> 
>>
>> -- 
>> Open WebMail Project (http://openwebmail.org)
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> -- 
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>


--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WSDL and OMElement problems

2006-12-28 Thread schalk
Hi Paul,

Here is the services.xml


Order processing web service. Currently implemented for
Engen.   
za.co.cxchange.soap.business.ConfirmationProcessService


urn:processConfirmation



WSDL

http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:types="http://localhost:8080/cxws/types";
xmlns:ns="http://localhost:8080/cxws/services/ConfirmationProcessService";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
targetNamespace="http://ws.myrelease.info";>
   







http://schemas.xmlsoap.org/soap/http";
style="document" />   



http://localhost:8080/cxws/services/ConfirmationProcessService"; />




http://schemas.xmlsoap.org/soap/http";
style="document" />   



http://localhost:8080/cxws/services/ConfirmationProcessService"; />





http://localhost:8080/axis2/services/ConfirmationProcessService"; />


http://localhost:8080/axis2/services/ConfirmationProcessService"; />




--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WSDL and OMElement problems

2006-12-28 Thread schalk
Greetings All,

First thing I am unclear about is, when clicking on the link on the deployed
services page that should show the WSDL, it gives me the following result:

If you wish Axis2 to automatically generate the WSDL, then please use one of
the RPC message receivers for the service(s)/operation(s) in services.xml. If
you have added a custom WSDL in the META-INF directory, then please make sure
that the name of the service in services.xml (/serviceGroup/service/@name) is
the same as in the custom wsdl's service name
(/wsdl:definitions/wsdl:service/@name).

Now, here is the snippets from my services.xml and WSDL I believe to be the
relevant:





http://localhost:8080/axis2/services/ConfirmationProcessService"; />


>From looking at this my service name and wsdl:service name is the same, so why
is Axis still saying it is not?

Second thing is, when invoking my service I get the following error:

AxisFault Cause: ServiceClass does not implement required method of the form
OMElement processConfirmation(OMElement e)

But, here is my service:

public OMElement processConfirmation(OMElement element) throws
XMLStreamException {

code here

}

All help very much appreciated, thanks!

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AxisFault HTTP Header

2006-12-18 Thread schalk
Hi everyone,

I have struggeling with this problem now for a couple of days. If I use 
OperationClient opClient = sender.createClient(ServiceClient.ANON_OUT_ONLY_OP);

The SOAP message is sent and all seems fine. One thing I do get though is:
[org.apache.commons.httpclient.HttpMethodBase] - Discarding unexpected
response: HTTP/1.1 100 Continue

But I do not think this is stopping the service from completing successfully.

However, when I run the client with:
OperationClient opClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP);

I get both the httpclient problem as well as the following:
AxisFault Cause: Server did not recognize the value of HTTP Header SOAPAction:
urn:anonOutInOp.

Any and all help much appreciated. Thanks!
Schalk

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HTTP Header SOAPAction

2006-12-18 Thread schalk
Hi All,

When running the code below I get the following error. any idea...

ERROR  - [soap-service] - AxisFault Cause: Server did not recognize the value
of HTTP Header SOAPAction: urn:anonOutInOp.

log.debug("Sending envelope...\n");
opClient.execute(true); // Blocking invocation
MessageContext resp =
opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);

Also, how do I know whether or not the above execute method completed
successfully? Thank everyone!

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unknown message label

2006-12-15 Thread schalk
Greetings All,

When running the code below I get the following error:
Unknown message label In

ServiceClient sender = new ServiceClient();
sender.setOptions(options);
log.debug("Options set for ServiceClient...\n");

sender.addHeader(authorization);

OperationClient opClient = sender.createClient(ServiceClient.ANON_OUT_ONLY_OP);
MessageContext mc = new MessageContext();

mc.setServiceContext(opClient.getOperationContext().getServiceContext());

log.debug("Creating SOAPEnvelope...\n");
SOAPEnvelope envelope = factory.getDefaultEnvelope();   


log.debug("Creating SOAPBody...\n");
SOAPBody body = envelope.getBody(); 

send.addChild(dataIdentifier);
send.addChild(xmlData); 

body.addChild(send);

sender.addHeadersToEnvelope(envelope);
mc.setEnvelope(envelope);
opClient.addMessageContext(mc);

log.debug("Sending envelope...\n");
opClient.execute(true); // Blocking invocation
MessageContext resp =
opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);

--
Open WebMail Project (http://openwebmail.org)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMLStreamException

2006-12-14 Thread Schalk Neethling

Thanks a billion Javier!

Javier Kohen wrote:

El jue, 14-12-2006 a las 23:45 +0200, Schalk Neethling escribió:
  

Greetings Javier,

If you could send me the skeleton code that would be very helpful. Thanks!



SOAP over HTTP. Feel free to add this to the project's documentation if
you find it useful. It's based on code found inside ServiceClient.
Alternatively, one could modify ServiceClient to allow a whole envelope
to be passed, but I honestly don't know if that would break some design
principle.

Options options = new Options();
options.setTo(new EndpointReference(..)); // TODO Insert the endpoint
address here.
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setAction(..); // TODO Fill your SOAPAction here
options.setExceptionToBeThrownOnSOAPFault(true);

try{
ServiceClient serviceClient = new ServiceClient();
serviceClient.setOptions(options);
// TODO Add headers here.
serviceClient.addHeader(...);

OperationClient opClient =
serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
MessageContext mc = new MessageContext();

mc.setServiceContext(opClient.getOperationContext().getServiceContext());

SOAPFactory soapFactory = getSOAPFactory();
SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
SOAPBody body = envelope.getBody();
// TODO Add the body's children here
body.addChild(..);

serviceClient.addHeadersToEnvelope(envelope);
mc.setEnvelope(envelope);
opClient.addMessageContext(mc);
//  opClient.setCallback(new Callback() {
//  @Override
//  public void onComplete(AsyncResult result) {
//  System.out.println(result);
//  }
//
//  @Override
//  public void onError(Exception e) {
//  userCallback.failed(e);
//  }
//  });
//  opClient.execute(false); // Async. invocation
opClient.execute(true); // Blocking invocation
MessageContext response =
opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
} catch (AxisFault f) {
// TODO handle faults here
}

  

Javier Kohen wrote:


El jue, 14-12-2006 a las 23:09 +0200, Schalk Neethling escribió:
  
  

Hi there everyone,

My apologies beforehand for the large amount of code etc. I am new to 
Axis2 and I am currently implementing a web service. All is going well 
except when executing the code below I get the following error:


INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
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.



I've seen this just yesterday myself.

  
  

SOAPBody body = factory.createSOAPBody(envelope);
OMElement send = factory.createOMElement("Send", ns);



[ Lots of code removed. ]
  
  

body.addChild(send);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(envelope);



The solution is to pass sendReceive the send element directly; don't
pass it the envelope and body elements. SendReceive ends up
unconditionally wrapping the supplied OMElement within a body element.
Note that you can still set headers this way, by means of the
ServiceClient instance.

In my case, I needed to add two elements to the body, so I had to create
the whole envelope and use the OperationClient interface instead to run
the operation. I can give you skeleton code to do that, in case you need
it, it's only slightly more complex than the above.

Greetings,
  
  


--
Kind Regards
Schalk Neethling
Developer.President
AlliedBridge
Landlines
Tel: +27125468436
Fax: +21(0)865122050

Web
email:[EMAIL PROTECTED]
Global: www.alliedbridge.com

Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: [EMAIL PROTECTED]

We support OpenSource and Standards
OSI - http://www.opensource.org/
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/ 


The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error, please 
contact the sender and please delete all traces of this material from all 
devices.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMLStreamException

2006-12-14 Thread Schalk Neethling

Greetings Javier,

If you could send me the skeleton code that would be very helpful. Thanks!

Javier Kohen wrote:

El jue, 14-12-2006 a las 23:09 +0200, Schalk Neethling escribió:
  

Hi there everyone,

My apologies beforehand for the large amount of code etc. I am new to 
Axis2 and I am currently implementing a web service. All is going well 
except when executing the code below I get the following error:


INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
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.



I've seen this just yesterday myself.

  

SOAPBody body = factory.createSOAPBody(envelope);
OMElement send = factory.createOMElement("Send", ns);


[ Lots of code removed. ]
  

body.addChild(send);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(envelope);



The solution is to pass sendReceive the send element directly; don't
pass it the envelope and body elements. SendReceive ends up
unconditionally wrapping the supplied OMElement within a body element.
Note that you can still set headers this way, by means of the
ServiceClient instance.

In my case, I needed to add two elements to the body, so I had to create
the whole envelope and use the OperationClient interface instead to run
the operation. I can give you skeleton code to do that, in case you need
it, it's only slightly more complex than the above.

Greetings,
  


--
Kind Regards
Schalk Neethling
Developer.President
AlliedBridge
Landlines
Tel: +27125468436
Fax: +21(0)865122050

Web
email:[EMAIL PROTECTED]
Global: www.alliedbridge.com

Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: [EMAIL PROTECTED]

We support OpenSource and Standards
OSI - http://www.opensource.org/
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/ 


The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error, please 
contact the sender and please delete all traces of this material from all 
devices.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XMLStreamException

2006-12-14 Thread Schalk Neethling

Hi there everyone,

My apologies beforehand for the large amount of code etc. I am new to 
Axis2 and I am currently implementing a web service. All is going well 
except when executing the code below I get the following error:


INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
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.
INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - Retrying 
request
INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
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.
INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - Retrying 
request
INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
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.
INFO  - [org.apache.commons.httpclient.HttpMethodDirector] - Retrying 
request
ERROR  - [soap-service] - AxisFault Cause: 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.


Can anyone please have a look and let me know where I am going wrong. 
Thanks a million!


//Build the SOAP message   
   SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();

   log.debug("Creating SOAPEnvelope...\n");
   SOAPEnvelope envelope = factory.createSOAPEnvelope();
   log.debug("Creating SOAPHeader...\n");
   SOAPHeader header = factory.createSOAPHeader(envelope);
  
   ns = factory.createOMNamespace(namespace, "");

   log.debug("Adding elements to SOAPHeader...\n");
   OMElement authorization = 
factory.createOMElement("AuthHeader", ns);

   OMElement username = factory.createOMElement("Username", null);
   username.setText("cxchange");
   OMElement password = factory.createOMElement("Password", null);
   password.setText("test");
  
   authorization.addChild(username);

   authorization.addChild(password);
  
   header.addChild(authorization);   
  
   log.debug("Creating SOAPBody...\n");

   SOAPBody body = factory.createSOAPBody(envelope);
   OMElement send = factory.createOMElement("Send", ns);
  
   OMElement dataIdentifier = 
factory.createOMElement("dataIdentifier", null);

   dataIdentifier.setText("orderrequest");
   OMElement xmlData = factory.createOMElement("xmlData", null);
   xmlData.setText(fileData);
  
   send.addChild(dataIdentifier);
   send.addChild(xmlData);   
  
   body.addChild(send);
  
   EndpointReference targetEPR = new EndpointReference(url);
  


   // Make the request message
   log.debug("Setting up options for ServiceClient...\n");
   Options options = new Options();
   options.setTo(targetEPR);
   log.debug("Target endpoint at 16:55 is: " + targetEPR + "\n");

   ServiceClient sender = new ServiceClient();
   sender.setOptions(options);
   log.debug("Options set for ServiceClient...\n");

   log.debug("Sending envelope...\n");
   log.debug("Envelope data: \n");
   log.debug(envelope);
   OMElement result = sender.sendReceive(envelope);

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]