You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Albert Rainer <al...@ec3.at> on 2008/04/11 17:06:49 UTC

sdo newbie problem

hello,
I have a problem when I invoke a webservice. 
The service is made from java, it creates a ec3.move.types.Comment and returns it;:
public Comment createComment(String key,String reference,String caption,String body)throws Exception{
	Comment comment=new Comment(key,reference,caption,body);
	store(comment);	
return comment;
}
It have generated the type with the XSDGenerator from the wsdl:


<wsdl:types>
        <xs:schema xmlns:ax21="http://types.move.ec3/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://types.move.ec3/xsd">
            <xs:complexType name="Comment">
                <xs:sequence>
                    <xs:element minOccurs="0" name="body" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="caption" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="entryId" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="owner" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="reference" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="tstamp" nillable="true" type="xs:dateTime"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
...
the Interface gnerated is 
ec3.move.types.xsd.Comment 
and the implementation generated is
ec3.move.types.xsd.impl.CommentImpl 


A local interface with <ws.binding endpoint>:

@Remotable
public interface RemoteCommentService {

	public ec3.move.types.xsd.impl..CommentImpl createComment(String key, String reference, String caption,
			String body);

the Client calls:
commentService.newComment("bla", "bla", "blabla");

 the Exception occurs.
(other calls that return integer values work correctly)

Exception in thread "main" org.apache.tuscany.sca.databinding.TransformationException: org.apache.tuscany.sca.databinding.TransformationException: java.lang.RuntimeException: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:

Package with uri 'http://impl.xsd.types.move.ec3/xsd' not found.
......

How can I solve this problem?

Thanks in advance

Albert




----------------------------------------------------------------
Dr. Albert Rainer
EC3 - Electronic Commerce Competence Center
www.ec3.at
Donau-City Strasse 1
A-1220 Wien
Tel: +43 1 522 71 71 - 33
Fax: +43 1 522 71 71 - 71


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


Using generated SDO classes in SCA, was: Re: sdo newbie problem

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Welcome to Tuscany!

I intentionally modified the subject your issue is about how to use 
generated SDO classes in SCA. Here is a quick answer:

You need to have the <import.sdo> statement to the composite file to 
register the SDO metadata.

<composite ...>
<dbsdo:import.sdo factory="The interface name of the generated SDO factory" 
xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"/>
</composite>

There are some discussions on the ML about how to scope the SDO types in the 
context of SCA composition. See 
http://markmail.org/message/ib4wotcru3bviqlb.

Thanks,
Raymond
--------------------------------------------------
From: "Albert Rainer" <al...@ec3.at>
Sent: Friday, April 11, 2008 8:06 AM
To: <tu...@ws.apache.org>
Subject: sdo newbie problem

> hello,
> I have a problem when I invoke a webservice.
> The service is made from java, it creates a ec3.move.types.Comment and 
> returns it;:
> public Comment createComment(String key,String reference,String 
> caption,String body)throws Exception{
> Comment comment=new Comment(key,reference,caption,body);
> store(comment);
> return comment;
> }
> It have generated the type with the XSDGenerator from the wsdl:
>
>
> <wsdl:types>
>        <xs:schema xmlns:ax21="http://types.move.ec3/xsd" 
> attributeFormDefault="qualified" elementFormDefault="qualified" 
> targetNamespace="http://types.move.ec3/xsd">
>            <xs:complexType name="Comment">
>                <xs:sequence>
>                    <xs:element minOccurs="0" name="body" nillable="true" 
> type="xs:string"/>
>                    <xs:element minOccurs="0" name="caption" 
> nillable="true" type="xs:string"/>
>                    <xs:element minOccurs="0" name="entryId" 
> nillable="true" type="xs:string"/>
>                    <xs:element minOccurs="0" name="owner" nillable="true" 
> type="xs:string"/>
>                    <xs:element minOccurs="0" name="reference" 
> nillable="true" type="xs:string"/>
>                    <xs:element minOccurs="0" name="tstamp" nillable="true" 
> type="xs:dateTime"/>
>                </xs:sequence>
>            </xs:complexType>
>        </xs:schema>
> ...
> the Interface gnerated is
> ec3.move.types.xsd.Comment
> and the implementation generated is
> ec3.move.types.xsd.impl.CommentImpl
>
>
> A local interface with <ws.binding endpoint>:
>
> @Remotable
> public interface RemoteCommentService {
>
> public ec3.move.types.xsd.impl..CommentImpl createComment(String key, 
> String reference, String caption,
> String body);
>
> the Client calls:
> commentService.newComment("bla", "bla", "blabla");
>
> the Exception occurs.
> (other calls that return integer values work correctly)
>
> Exception in thread "main" 
> org.apache.tuscany.sca.databinding.TransformationException: 
> org.apache.tuscany.sca.databinding.TransformationException: 
> java.lang.RuntimeException: 
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>
> Package with uri 'http://impl.xsd.types.move.ec3/xsd' not found.
> ......
>
> How can I solve this problem?
>
> Thanks in advance
>
> Albert
>
>
>
>
> ----------------------------------------------------------------
> Dr. Albert Rainer
> EC3 - Electronic Commerce Competence Center
> www.ec3.at
> Donau-City Strasse 1
> A-1220 Wien
> Tel: +43 1 522 71 71 - 33
> Fax: +43 1 522 71 71 - 71
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
> 

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