java2wsdl arrays not getting set unbounded

2009-07-28 Thread Lachlan Deck

Hi there,

Any help appreciated for the following problem :-)

Each time I regenerate classes from an rpc-based wsdl any arrays  
defined are wrongly created.


i.e., they have the private field and usual bean-style getter and  
setter but they're missing the following two additional steps:

1) elemField.setMaxOccursUnbounded(true);

2) array access helpers:
getKey(int i) {..}
setKey(int i, Type value) {...}

Without these two things - I find that at runtime it only deserialises  
a single element of the array even though the array was passed with  
multiple elments (e.g., multiple invoice lines, only a single one  
received!). That same problem is described here and info is given on  
manually fixing it - but it's a maintenance nightmare!

http://publib.boulder.ibm.com/infocenter/wpc/v5r3m2/index.jsp?topic=/com.ibm.wpc.doc/javaapi/japi6.html

Is anyone aware of a WSDL2JavaFactory class helper (or have  
instructions on how to go about creating one) that will fix these  
things whenever the java is generated from the wsdl?


It's really annoying having to (a) create them by hand and (b) revert  
part of the changes on each file that was updated every time there's  
an update.


with regards,
--

Lachlan Deck





maxOccurs=unbounded missing from generated wsdl

2009-07-19 Thread Lachlan Deck

Hi there,

I'm having a problem recently with WSDL4J (well, actually, WSDL  
generation I suppose with Java2WSDL) where arrays are not getting  
generated with maxOccurs=unbounded. As such when data is replicated  
it doesn't update properly remotely.


i.e., in a java stub class I'd have something like:
public byte[] content;

This used to cause the WSDL to include maxOccurs=unbounded along  
with nillable=true. Now it seems to exclude maxOccurs=unbounded  
and so when generating classes from the wsdl I get something like this:


elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName(discountIDs);
elemField.setXmlName(new javax.xml.namespace.QName(, discountIDs));
elemField.setXmlType(new javax.xml.namespace.QName(http://schemas.xmlsoap.org/soap/encoding/ 
, integer));

elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);

Whereas previously it would also include the following:
elemField.setMaxOccursUnbounded(true);

I can't figure yet what changed to cause this problem - but has anyone  
seen this?


I'm depending on Axis 1.4, WSDL4J 1.6.2 (etc). I've tried a couple of  
other older versions but I can't find the regression.


Any help appreciated.

with regards,
--

Lachlan Deck



Re: maxOccurs=unbounded missing from generated wsdl

2009-07-19 Thread Lachlan Deck

Slight correction...

On 20/07/2009, at 3:20 PM, Lachlan Deck wrote:

I'm having a problem recently with WSDL4J (well, actually, WSDL  
generation I suppose with Java2WSDL) where arrays are not getting  
generated with maxOccurs=unbounded. As such when data is  
replicated it doesn't update properly remotely.


i.e., in a java stub class I'd have something like:
public byte[] content;

This used to cause the WSDL to include maxOccurs=unbounded along  
with nillable=true. Now it seems to exclude maxOccurs=unbounded  
and so when generating classes from the wsdl I get something like  
this:


elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName(discountIDs);
elemField.setXmlName(new javax.xml.namespace.QName(,  
discountIDs));
elemField.setXmlType(new javax.xml.namespace.QName(http://schemas.xmlsoap.org/soap/encoding/ 
, integer));

elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);

Whereas previously it would also include the following:
elemField.setMaxOccursUnbounded(true);

- elemField.setNillable(false);

I can't figure yet what changed to cause this problem - but has  
anyone seen this?


I'm depending on Axis 1.4, WSDL4J 1.6.2 (etc). I've tried a couple  
of other older versions but I can't find the regression.


Any help appreciated.

with regards,
--

Lachlan Deck



with regards,
--

Lachlan Deck



Null pointer

2009-07-08 Thread Lachlan Deck

Hi there,

I've recently been having some problems with a webservice we serve up.  
I'd really appreciate any pointers on the cause and if there's a fix  
and if there's a particular version that introduced the problem.


I think the problem has to do with attachments (as I can no longer  
receive these from clients) with the following stack trace.


We're using Axis 1.4 (and related dependencies).

Any ideas or pointers on where the problem might be?


java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
	at  
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java: 
333)
	at  
org 
.apache 
.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java: 
454)

at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
...
Caused by: java.lang.NullPointerException
	at  
org 
.apache 
.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:135)
	at  
org 
.apache 
.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
	at  
org 
.apache 
.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
	at  
org 
.apache 
.axis 
.encoding 
.DeserializationContext.endElement(DeserializationContext.java:1087)
	at  
org 
.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 
171)
	at  
org 
.apache 
.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
	at  
org 
.apache 
.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
	at  
org 
.apache 
.axis 
.encoding 
.DeserializationContext.startElement(DeserializationContext.java:1048)
	at  
org 
.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 
165)
	at  
org 
.apache 
.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
	at  
org 
.apache 
.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
	at  
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java: 
323)

... 18 more


with regards,
--

Lachlan Deck





AxisFault Server.NoService on deploy

2009-02-19 Thread Lachlan Deck

Hi there,

I've recently updated a server app that was previously using Axis 1.1  
to Axis 1.4 but am now getting AxisFault - Server.NoService on our  
deployment servers only :-/


wsdl4j was used to generate the stubs for the client apps (that are  
out in the wild - all of which use Axis1.4) prior to the upgrade of  
the server. They've all been running for months.


Now attempting to upgrade the server - which I've tested both on my  
dev machine and our intranet - it seems that Axis isn't behaving.


i.e., the following debug output shows that the service handler is not  
being set. I see one or two similar messages on my local machine  
(e.g., for attachments or something I guess) but otherwise a service  
handler gets registered at some point in the long line of debug  
messages.


Can anyone shed some light on what might be going on here?
Thanks.


27941 DEBUG 2009-02-20 11:33:12,091 [WorkerThread15]  
(apache.axis.MessageContext, setService, 793) -

MessageContext: setServiceHandler(null)
...

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(apache.axis.SOAPPart, getAsSOAPEnvelope, 661) -

Enter: SOAPPart::getAsSOAPEnvelope()

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(axis.i18n.ProjectResourceBundle, handleGetObject, 72) -

org.apache.axis.i18n.resource::handleGetObject(currForm)

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(apache.axis.SOAPPart, getAsSOAPEnvelope, 662) -

current form is FORM_SOAPENVELOPE

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(axis.i18n.ProjectResourceBundle, handleGetObject, 72) -

org.apache.axis.i18n.resource::handleGetObject(noService05)

[2009-2-20 11:33:12 EST] WorkerThread15 AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.NoService
 faultSubcode:
 faultString: The AXIS engine could not find a target service to  
invoke!  targetService is null

 faultActor:
 faultNode:
 faultDetail:
	{http://xml.apache.org/axis/}stackTrace:The AXIS engine could not  
find a target service to invoke!  targetService is null

at org.apache.axis.server.AxisServer.invoke(AxisServer.java:270)
	at  
com 
.webobjects 
.appserver._private.WOWebService.performActionNamed(WOWebService.java: 
437)
	at  
com 
.webobjects 
.appserver 
._private 
.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
	at  
com 
.webobjects 
.appserver 
._private 
.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:161)
	at  
com 
.webobjects 
.appserver 
._private 
.WOWebServiceRequestHandler 
.handleRequest(WOWebServiceRequestHandler.java:109)
	at  
ish 
.willowservices 
.appserver 
.ISHWebServiceRequestHandler 
.handleRequest(ISHWebServiceRequestHandler.java:140)
	at  
com 
.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java: 
1687)
	at  
er 
.extensions 
.appserver 
.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1737)
	at  
er 
.extensions 
.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1702)
	at  
com 
.ish 
.webobjects 
.appserver.ISHApplication.dispatchRequest(ISHApplication.java:1025)
	at  
ish 
.willowservices.appserver.Application.dispatchRequest(Application.java: 
236)
	at  
com 
.webobjects 
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
	at  
com 
.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java: 
226)

at java.lang.Thread.run(Thread.java:619)


with regards,
--

Lachlan Deck





Re: AxisFault Server.NoService on deploy

2009-02-19 Thread Lachlan Deck
So interestingly, the old wsdd file just had a transport defined for  
http (which is the default I believe for new projects)

transport name=http
  requestFlow
   handler type=HTTPActionHandler/
   handler type=URLMapper/
  /requestFlow
 /transport

Axis logs mentioned this on the old app (Axis 1.1):
AxisServer.invoke:  Transport = 'http'

But on the new app (Axis 1.4) it was:
AxisServer.invoke:  Transport = 'https'

Thus there was no match in the server.wsdd file. So adding a copy for  
https did the trick.

transport name=https
  requestFlow
   handler type=HTTPActionHandler/
   handler type=URLMapper/
  /requestFlow
 /transport

On 20/02/2009, at 12:59 PM, Lachlan Deck wrote:


Hi there,

I've recently updated a server app that was previously using Axis  
1.1 to Axis 1.4 but am now getting AxisFault - Server.NoService on  
our deployment servers only :-/


wsdl4j was used to generate the stubs for the client apps (that are  
out in the wild - all of which use Axis1.4) prior to the upgrade of  
the server. They've all been running for months.


Now attempting to upgrade the server - which I've tested both on my  
dev machine and our intranet - it seems that Axis isn't behaving.


i.e., the following debug output shows that the service handler is  
not being set. I see one or two similar messages on my local machine  
(e.g., for attachments or something I guess) but otherwise a service  
handler gets registered at some point in the long line of debug  
messages.


Can anyone shed some light on what might be going on here?
Thanks.


27941 DEBUG 2009-02-20 11:33:12,091 [WorkerThread15]  
(apache.axis.MessageContext, setService, 793) -

MessageContext: setServiceHandler(null)
...

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(apache.axis.SOAPPart, getAsSOAPEnvelope, 661) -

Enter: SOAPPart::getAsSOAPEnvelope()

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(axis.i18n.ProjectResourceBundle, handleGetObject, 72) -

org.apache.axis.i18n.resource::handleGetObject(currForm)

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(apache.axis.SOAPPart, getAsSOAPEnvelope, 662) -

current form is FORM_SOAPENVELOPE

27981 DEBUG 2009-02-20 11:33:12,131 [WorkerThread15]  
(axis.i18n.ProjectResourceBundle, handleGetObject, 72) -

org.apache.axis.i18n.resource::handleGetObject(noService05)

[2009-2-20 11:33:12 EST] WorkerThread15 AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoService
faultSubcode:
faultString: The AXIS engine could not find a target service to  
invoke!  targetService is null

faultActor:
faultNode:
faultDetail:
	{http://xml.apache.org/axis/}stackTrace:The AXIS engine could not  
find a target service to invoke!  targetService is null

at org.apache.axis.server.AxisServer.invoke(AxisServer.java:270)
	at  
com 
.webobjects 
.appserver 
._private.WOWebService.performActionNamed(WOWebService.java:437)
	at  
com 
.webobjects 
.appserver 
._private 
.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java: 
259)
	at  
com 
.webobjects 
.appserver 
._private 
.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:161)
	at  
com 
.webobjects 
.appserver 
._private 
.WOWebServiceRequestHandler 
.handleRequest(WOWebServiceRequestHandler.java:109)
	at  
ish 
.willowservices 
.appserver 
.ISHWebServiceRequestHandler 
.handleRequest(ISHWebServiceRequestHandler.java:140)
	at  
com 
.webobjects 
.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
	at  
er 
.extensions 
.appserver 
.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1737)
	at  
er 
.extensions 
.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1702)
	at  
com 
.ish 
.webobjects 
.appserver.ISHApplication.dispatchRequest(ISHApplication.java:1025)
	at  
ish 
.willowservices 
.appserver.Application.dispatchRequest(Application.java:236)
	at  
com 
.webobjects 
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
	at  
com 
.webobjects 
.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)

at java.lang.Thread.run(Thread.java:619)


with regards,
--

Lachlan Deck





with regards,
--

Lachlan Deck





how to provide custom constants?

2007-08-16 Thread Lachlan Deck

Hi there,

I've done some googling but have come up short on this... can someone  
please enlighten me on how to provide custom constants for certain  
webservice method invocation arguments?


Thanks muchly.

with regards,
--

Lachlan Deck




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



Help with chunked transfers

2007-07-05 Thread Lachlan Deck

Hi there,

I'm currently using Axis 1.4 (Java) and am attempting to utilise  
chunked transfers (in the hope that this would simplify sending some  
binary data)... anyway, when I enable chunked I get a (411)Length  
Required exception (as seen below).


Any suggestions on the proper way to do this would be greatly  
appreciated.


Thanks.

//
// Here's how I'm instantiating my stub.
//
public MainServiceSoapBindingStub mainStub() {
if ( _stub == null ) {
MainService_ServiceLocator serviceLocator;

serviceLocator = new MainService_ServiceLocator();
		this._stub = (MainServiceSoapBindingStub)  
serviceLocator.getMainService();

...

if (  enable compression condition  ) {
Map httpSettings;

// Set property to compress requests
this._stub._setProperty(HTTPConstants.MC_GZIP_REQUEST, 
Boolean.TRUE);
// Tell the server it can compress responses
this._stub._setProperty(HTTPConstants.MC_ACCEPT_GZIP, 
Boolean.TRUE);

// enable chunking and http 1.1
httpSettings = new Hashtable();
			httpSettings.put(MessageContext.HTTP_TRANSPORT_VERSION,  
HTTPConstants.HEADER_PROTOCOL_V11);
			httpSettings.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,  
Boolean.TRUE);

this._stub._setProperty(HTTPConstants.REQUEST_HEADERS, 
httpSettings);
}
}
}

//
// exception when attempting to contact web service...
// Note: the webservice is not even hit as it's not
// even running yet, but certainly Apache is up).
//
 [java] AxisFault
 [java]  faultCode: {http://xml.apache.org/axis/}HTTP
 [java]  faultSubcode:
 [java]  faultString: (411)Length Required
 [java]  faultActor:
 [java]  faultNode:
 [java]  faultDetail:
 [java] {}:return code:  411
 [java] lt;!DOCTYPE HTML PUBLIC quot;-//IETF//DTD HTML 2.0// 
ENquot;gt;

 [java] lt;HTMLgt;lt;HEADgt;
 [java] lt;TITLEgt;411 Length Requiredlt;/TITLEgt;
 [java] lt;/HEADgt;lt;BODYgt;
 [java] lt;H1gt;Length Requiredlt;/H1gt;
 [java] A request of the requested method POST requires a valid  
Content-length.lt;Pgt;
 [java] chunked Transfer-Encoding forbidden: /cgi-bin/WebObjects/ 
Test.woa/-51233/ws/MainServicelt;Pgt;

 [java] lt;HRgt;
 [java] lt;ADDRESSgt;Apache/1.3.33 Server at d-mac.local Port  
80lt;/ADDRESSgt;

 [java] lt;/BODYgt;lt;/HTMLgt;
 [java]
 [java] {http://xml.apache.org/axis/}HttpErrorCode:411
 [java]
 [java] (411)Length Required
 [java] at  
org.apache.axis.transport.http.CommonsHTTPSender.invoke 
(CommonsHTTPSender.java:218)
 [java] at  
org.apache.axis.strategies.InvocationStrategy.visit 
(InvocationStrategy.java:32)
 [java] at org.apache.axis.SimpleChain.doVisiting 
(SimpleChain.java:118)
 [java] at org.apache.axis.SimpleChain.invoke 
(SimpleChain.java:83)
 [java] at org.apache.axis.client.AxisClient.invoke 
(AxisClient.java:165)
 [java] at org.apache.axis.client.Call.invokeEngine 
(Call.java:2784)

 [java] at org.apache.axis.client.Call.invoke(Call.java:2767)
 [java] at org.apache.axis.client.Call.invoke(Call.java:2443)
 [java] at org.apache.axis.client.Call.invoke(Call.java:2366)
 [java] at org.apache.axis.client.Call.invoke(Call.java:1812)
 [java] at  
my.client.app.ws.stubs.MainServiceSoapBindingStub.blahBlah 
(MainServiceSoapBindingStub.java:874)

 [java] ..

with regards,
--

Lachlan Deck


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