You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alistair Young <al...@smo.uhi.ac.uk> on 2007/04/06 12:23:25 UTC

Re: [Axis2] Axis2 1.2 RC2 Released - SOAP problem

Using the nightly build.

In my MessageReceiverInOut I get this error when invoking a web service:

org.apache.axis2.AxisFault: First Element must contain the local name,
Envelope

I've checked on the wire and this is what comes in:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<GetBriefcaseInput
xmlns="uk:ac:ox:oucs:ask:repo:ws:collectionmanager:messages:types">
			<caller />
			<uid />
		</GetBriefcaseInput>
	</soapenv:Body>
</soapenv:Envelope>

the problem happens when the message receiver calls fromOM():
                                                             (GetBriefcaseInputDocument)fromOM(
msgContext.getEnvelope().getBody().getFirstElement(),
GetBriefcaseInputDocument.class,
getEnvelopeNamespaces(msgContext.getEnvelope()));

why would it say that Envelope is missing?

thanks,

Alistair




-- 
mov eax,1
mov ebx,0
int 80h

> Hi Deepal
>
> Let me suggest that the problem arises because Axis2 doesn't take the
> service namespace into account. In my opinion services should be
> differentiated by both name and namespace. This should be the "key"
> for any mapping. Imagine that I have many clients wanting to deploy
> services - then it will be guaranteed that there are collisions in
> names. If they would use their own company namespace, in addition to
> that, this problem would be certainly avoided. Thanks.
>
> Regards,
> Angel
>
> On 4/6/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>> Hi All;
>>
>> I think this a major issue AFAIK , if some one generate services for two
>> wsdls then he will get two services with the same name . Then the issue
>> is how do you differentiate the two ? you can not deploy the files with
>> the same name to services directory (only one will be picked up).
>> Therefore I think we need to fix this b4 the release and I think we
>> should either pick WSDL file name as the service aar name or the one of
>> the service name in the wsdl as the service aar file name.
>>
>> Thanks
>> Deepal
>>
>> Alistair Young wrote:
>>
>> >wsdl2java now creates the service as Service.aar instead of
>> >ServiceName.aar. e.g. previously, if your service was called
>> >MinervaService, you would get:
>> >build/lib/MinervaService.aar
>> >
>> >now you get:
>> >build/lib/Service.aar
>> >
>> >so you have to rename before deploying (as they're all called
>> Service.aar
>> >now)
>> >
>> >Alistair
>> >
>> >
>> >
>> >
>>
>> --
>> Thanks,
>> Deepal
>> ................................................................
>> "The highest tower is built one brick at a time"
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Axis2 1.2 RC2 Released - SOAP problem

Posted by david2 <Da...@l-3comcept.com>.
Alistair,

I just encountered this, too.  My *.aar ran fine in Wondows XP, but gets the
same "First Element must contain the local name, Envelope" error when I
tried to run it under Linux.  However, I am only using a single WSDL with an
imported XSD file.  Is there any was around inserting the XSD into the WSDL?

-David

-- 
View this message in context: http://www.nabble.com/Re-%3A--Axis2--Axis2-1.2-RC2-Released-tf3531026.html#a10401246
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Axis2 1.2 RC2 Released - SOAP problem

Posted by Alistair Young <al...@smo.uhi.ac.uk>.
sorted! was my fault (as usual!).

In the modular WSDL, the messages.wsdl file wasn't importing the
messages-types.xsd. It was imported in the root WSDL file but wasn't
making it's way down to the messages.wsdl file.

Removing the xsd import from the root WSDL and putting it in the
messages.wsdl solved the problem.

must blog that...

Alistair


-- 
mov eax,1
mov ebx,0
int 80h

> The problem only occurs if I split up the WSDL into modular parts:
>
> WSDL_1 includes types from two XSD files
> WSDL_1 imports bindings from WSDL_2
> bindings imports portTypes from WSDL_3
> portTypes imports messages from WSDL_4
>
> if I combine the whole lot into one WSDL file, it works.
>
> In both cases the SOAP on the wire is identical so it must be something to
> do with the generated classes in the service.
>
> Alistair
>
>
>
> --
> mov eax,1
> mov ebx,0
> int 80h
>
>> Using the nightly build.
>>
>> In my MessageReceiverInOut I get this error when invoking a web service:
>>
>> org.apache.axis2.AxisFault: First Element must contain the local name,
>> Envelope
>>
>> I've checked on the wire and this is what comes in:
>>
>> <?xml version='1.0' encoding='UTF-8'?>
>> <soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>> 	<soapenv:Body>
>> 		<GetBriefcaseInput
>> xmlns="uk:ac:ox:oucs:ask:repo:ws:collectionmanager:messages:types">
>> 			<caller />
>> 			<uid />
>> 		</GetBriefcaseInput>
>> 	</soapenv:Body>
>> </soapenv:Envelope>
>>
>> the problem happens when the message receiver calls fromOM():
>>                                                              (GetBriefcaseInputDocument)fromOM(
>> msgContext.getEnvelope().getBody().getFirstElement(),
>> GetBriefcaseInputDocument.class,
>> getEnvelopeNamespaces(msgContext.getEnvelope()));
>>
>> why would it say that Envelope is missing?
>>
>> thanks,
>>
>> Alistair
>>
>>
>>
>>
>> --
>> mov eax,1
>> mov ebx,0
>> int 80h
>>
>>> Hi Deepal
>>>
>>> Let me suggest that the problem arises because Axis2 doesn't take the
>>> service namespace into account. In my opinion services should be
>>> differentiated by both name and namespace. This should be the "key"
>>> for any mapping. Imagine that I have many clients wanting to deploy
>>> services - then it will be guaranteed that there are collisions in
>>> names. If they would use their own company namespace, in addition to
>>> that, this problem would be certainly avoided. Thanks.
>>>
>>> Regards,
>>> Angel
>>>
>>> On 4/6/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>>>> Hi All;
>>>>
>>>> I think this a major issue AFAIK , if some one generate services for
>>>> two
>>>> wsdls then he will get two services with the same name . Then the
>>>> issue
>>>> is how do you differentiate the two ? you can not deploy the files
>>>> with
>>>> the same name to services directory (only one will be picked up).
>>>> Therefore I think we need to fix this b4 the release and I think we
>>>> should either pick WSDL file name as the service aar name or the one
>>>> of
>>>> the service name in the wsdl as the service aar file name.
>>>>
>>>> Thanks
>>>> Deepal
>>>>
>>>> Alistair Young wrote:
>>>>
>>>> >wsdl2java now creates the service as Service.aar instead of
>>>> >ServiceName.aar. e.g. previously, if your service was called
>>>> >MinervaService, you would get:
>>>> >build/lib/MinervaService.aar
>>>> >
>>>> >now you get:
>>>> >build/lib/Service.aar
>>>> >
>>>> >so you have to rename before deploying (as they're all called
>>>> Service.aar
>>>> >now)
>>>> >
>>>> >Alistair
>>>> >
>>>> >
>>>> >
>>>> >
>>>>
>>>> --
>>>> Thanks,
>>>> Deepal
>>>> ................................................................
>>>> "The highest tower is built one brick at a time"
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Axis2 1.2 RC2 Released - SOAP problem

Posted by Alistair Young <al...@smo.uhi.ac.uk>.
The problem only occurs if I split up the WSDL into modular parts:

WSDL_1 includes types from two XSD files
WSDL_1 imports bindings from WSDL_2
bindings imports portTypes from WSDL_3
portTypes imports messages from WSDL_4

if I combine the whole lot into one WSDL file, it works.

In both cases the SOAP on the wire is identical so it must be something to
do with the generated classes in the service.

Alistair



-- 
mov eax,1
mov ebx,0
int 80h

> Using the nightly build.
>
> In my MessageReceiverInOut I get this error when invoking a web service:
>
> org.apache.axis2.AxisFault: First Element must contain the local name,
> Envelope
>
> I've checked on the wire and this is what comes in:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> 	<soapenv:Body>
> 		<GetBriefcaseInput
> xmlns="uk:ac:ox:oucs:ask:repo:ws:collectionmanager:messages:types">
> 			<caller />
> 			<uid />
> 		</GetBriefcaseInput>
> 	</soapenv:Body>
> </soapenv:Envelope>
>
> the problem happens when the message receiver calls fromOM():
>                                                              (GetBriefcaseInputDocument)fromOM(
> msgContext.getEnvelope().getBody().getFirstElement(),
> GetBriefcaseInputDocument.class,
> getEnvelopeNamespaces(msgContext.getEnvelope()));
>
> why would it say that Envelope is missing?
>
> thanks,
>
> Alistair
>
>
>
>
> --
> mov eax,1
> mov ebx,0
> int 80h
>
>> Hi Deepal
>>
>> Let me suggest that the problem arises because Axis2 doesn't take the
>> service namespace into account. In my opinion services should be
>> differentiated by both name and namespace. This should be the "key"
>> for any mapping. Imagine that I have many clients wanting to deploy
>> services - then it will be guaranteed that there are collisions in
>> names. If they would use their own company namespace, in addition to
>> that, this problem would be certainly avoided. Thanks.
>>
>> Regards,
>> Angel
>>
>> On 4/6/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>>> Hi All;
>>>
>>> I think this a major issue AFAIK , if some one generate services for
>>> two
>>> wsdls then he will get two services with the same name . Then the issue
>>> is how do you differentiate the two ? you can not deploy the files with
>>> the same name to services directory (only one will be picked up).
>>> Therefore I think we need to fix this b4 the release and I think we
>>> should either pick WSDL file name as the service aar name or the one of
>>> the service name in the wsdl as the service aar file name.
>>>
>>> Thanks
>>> Deepal
>>>
>>> Alistair Young wrote:
>>>
>>> >wsdl2java now creates the service as Service.aar instead of
>>> >ServiceName.aar. e.g. previously, if your service was called
>>> >MinervaService, you would get:
>>> >build/lib/MinervaService.aar
>>> >
>>> >now you get:
>>> >build/lib/Service.aar
>>> >
>>> >so you have to rename before deploying (as they're all called
>>> Service.aar
>>> >now)
>>> >
>>> >Alistair
>>> >
>>> >
>>> >
>>> >
>>>
>>> --
>>> Thanks,
>>> Deepal
>>> ................................................................
>>> "The highest tower is built one brick at a time"
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org