NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: Problem generating WebService from WSDL using Maven and NB 6.8

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
Jonathan Lister
Posted via mailing list.





PostPosted: Tue Mar 23, 2010 4:07 pm    Post subject: Re: Problem generating WebService from WSDL using Maven and NB 6.8 Reply with quote

Thanks Jaroslav,
the tip about taking the generated "warpper" WSDl from src/conf/wsdl worked
after a bit of a kick ...

There is still something a bit weird - this happened BOTH with my WSDL and
also an example WSDL downloaded from NetBeans.

I started a new maven EJB project and used theCreditReportSimple WSDL
downleaded from netbeans "binding WSDL to Java" tutorial. The first time I
ran the wizard there were entries in the log file about not being able to
find wsdl:service ..

[ERROR]failed.noservice=Could not find wsdl:service in the provided WSDL(s):
At least one WSDL with at least one service definition needs to be
provided.


Failed to parse the WSDL.
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Error executing: wsimport

but it did generate a webService Java class - however, the class was
annotated twice with @WebService and @Stateless ..

@WebService()
@Stateless()
@WebService(serviceName = "XXV1Service", portName = "XXV1Port",
endpointInterface = "com.acme.v1.XXV1Port", targetNamespace =
"http://xml.acme.com/wsdl/internal/draft/XXX/v1", wsdlLocation =
"META-INF/wsdl/XXXabstractWrapper.wsdl")
@Stateless
public class XXXV1 {

deleting one set of these annotations and re-compiling fixed things ;-)



Jaroslav Pospisil wrote:
Quote:

Hi,
abstract WSDL's aren't supported in Maven projects. You have either to
use WSDL containing binding or create web service from WSDL in ant EJB
module and then use generated
WSDL (src/conf/wsdl/your.wsdl) in Maven project.

-jpl


--
View this message in context: http://old.nabble.com/Problem-generating-WebService-from-WSDL-using-Maven-and-NB-6.8-tp28002295p28002942.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.
Back to top
Jonathan Lister
Posted via mailing list.





PostPosted: Tue Mar 23, 2010 4:26 pm    Post subject: Re: Problem generating WebService from WSDL using Maven and NB 6.8 Reply with quote

Supplemental question - is it possible to overide the java classes used to
represent xsd types when using a maven ejb / webserivices project?
In a regular ejb project I used a Bindings.xjb file to map xsd:dateTime to
joda.time.DateTime
but this doesn't seem to be working in maven EJB.


--
View this message in context: http://old.nabble.com/Problem-generating-WebService-from-WSDL-using-Maven-and-NB-6.8-tp28002295p28003389.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.
Back to top
mkuchtiak
Posted via mailing list.





PostPosted: Wed Mar 24, 2010 8:57 am    Post subject: Re: Problem generating WebService from WSDL using Maven and NB 6.8 Reply with quote

Just an idea:

- create a JAX-WS client in Maven project
- copy generated JAX-WS sources from
target/generated-sources/jaxws-wsimport to src/main/java
- remove, or comment out the "wsimport" execution in pom.xml, for example :

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<!--
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlFiles>
<wsdlFile>CurConv.asmx.wsdl</wsdlFile>
</wsdlFiles>

<staleFile>${project.build.directory}/jaxws/stale/CurConv.asmx.stale</staleFile>
</configuration>
<id>wsimport-generate-CurConv.asmx</id>
<phase>generate-sources</phase>
</execution>
-->
</executions>
...

- modify generated classes located in src/main/java

Milan

Jonathan Lister wrote:
Quote:
Supplemental question - is it possible to overide the java classes used to
represent xsd types when using a maven ejb / webserivices project?
In a regular ejb project I used a Bindings.xjb file to map xsd:dateTime to
joda.time.DateTime
but this doesn't seem to be working in maven EJB.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo