w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
maven jax-ws plugin does not generate client classes from wsdl
When using <pluginManagement> element in a pom file, you don't declare plugins usage, but plugins availability. <pluginManagement> is used in a parent pom to announce available plugins for child pom usage. Just remove this element, and the plugins should be called.

Categories : Web Services

WSDL dont generate stub code for android (devicemgmt.wsdl)
See here: http://www.coderanch.com/t/562144/Web-Services/java/Generating-client-code-wsdl-file You can generate the service stub code i.e. with wsimport from $JDK/bin - with this you are able to see more errors but i guess your problem is that the devicemgmt.wsdl not contains the service declaration itself so before generating stubs you must put end of this wsdl something like this: <wsdl:service name="DeviceService"> <wsdl:port name="DevicePort" binding="tds:DeviceBinding"> <soap:address location="http://localhost/onvif/device_service"/> </wsdl:port> </wsdl:service>

Categories : Android

How to make gradle generate a valid pom.xml file at the root of a project for maven users?
You can use the gradle maven plugin. This adds the pom convention method to your project, which you can use in a task to generate a pom.xml file, like apply plugin: 'maven' task createPom << { pom { project { groupId 'org.example' artifactId 'test' version '1.0.0' inceptionYear '2008' licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' distribution 'repo' } } } }.writeTo("pom.xml") } Then you call gradle createPom to generate the pom.xml in the project root. Of all the things in the pom definition, you should really provide

Categories : Java

IntelliJ, Maven, Flexmojos - Failed to generate Flex compiler configuration file
I just hit the same problem. The java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession is the issue and generated when you configure Intellij to use Maven v3.1.0 which doesn't include this library. Roll back to using Maven 3.0.5 with your flexmojos project to get this working.

Categories : Maven

Write jax-ws web service and generate WSDL without XSD
AFAIK it ist not possible to have JAX generate a WSDL with schemas inline. BTW: Separating the WSDL definition and the XSD schema is a good move (you might want to use the object structure defined by the schema in a different context e.g. storing data to files or something like that). That said: If you need an "all in one" WSDL (because some ancient client requires it) you can always have jax-ws generate the WSDL initially and then edit it to your heart's content. The edited WSDL can be included using the wsdlLocation parameter of the @WebService annotation.

Categories : Java

How to generate artifacts from WSDL and XSD using gradle?
Here's a similar question that has been answered: Howto generate classes from WSDL and XSD with gradle, equivalent to maven-jaxb2-plugin A blog article: http://joerglenhard.wordpress.com/2012/01/10/xjc-and-schemagen-with-gradle/ You can specify a bindings file with binding: 'your-file-here'

Categories : Java

Trouble consuming XLedger's SOAP/WSDL interface
Ok I figured it out. I had to make use of suds first. import httplib import urllib2 as u2 from suds.transport.http import HttpTransport class HTTPSClientAuthHandler(u2.HTTPSHandler): def __init__(self, key, cert): u2.HTTPSHandler.__init__(self) self.key = key self.cert = cert def https_open(self, req): # Rather than pass in a reference to a connection class, we pass in # a reference to a function which, for all intents and purposes, # will behave as a constructor return self.do_open(self.getConnection, req) def getConnection(self, host, timeout=300): return httplib.HTTPSConnection(host, key_file=self.key, cert_file=self.cert) class HTTPSClientCertTransport(HttpTransport): def __init__(self, key, cert, *a

Categories : Java

Cannot import wsdl:portType, wsdl:binding, wsdl:port
Turned out to be, we are reusing DataContract while generating proxy & old DataContract dll was not replaced in location from where it is referenced. Also get help from an response in question what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype?

Categories : C#

generate SOAP classes for iPhone from WSDL
I have personally used SUDZC in the past for generating SOAP services from a WSDL. It does support both ARC and non-ARC projects but it generates some very abstract code. Have a look at the website and try it out for yourself. If you find any other alternatives, let me know. Internally, we write most of our request/response handlers using AFNetworking nowadays.

Categories : Iphone

How to generate/create service endpoint from WSDL?
For example, i am using a WSDL link http://www.webservicex.net/geoipservice.asmx?WSDL go to command Prompt and create a folder : D:> mkdir SourceGen D:> cd SourceGen D:/SourceGen> mkdir Src D:/SourceGen>wsimport -keep -s Src http://www.webservicex.net/geoipservice.asmx?WSDL NOTE : Here some important term are need to describe -keep : it preserve all the generated .java files -s : store the file as given location at Src Generated Source go to D:/SourceGen/Src location where you will get all the required .java files and their .class files Now, copy all the java files and drag all .java files into the WebContent -> lib folder of client consumer Now, your client will use these files as Service Endpoint interface.

Categories : Java

wsdl importer seems to generate faulty code - inhertinace / abstract types issue
i found a workaround solution for this problem. i added a dummy element in the xsd for the Demand type like this: <xs:complexType name="Demand" abstract="true"> <xs:sequence> <xs:element name="person" type="Person" minOccurs="1" maxOccurs="unbounded" /> <xs:element name="dummy" type="xs:boolean" minOccurs="0" maxOccurs="1" nillable="true"/> </xs:sequence> </xs:complexType> then i imported the wsdl/xsd again in delphi XE3 and removed the dummy element from the generated code. Delphi now defines the Demand type as a class and all other demands (like the GarnishmentDemand) inherit from the Demand class and i'm able to access the person array like it was intended in the first place Demand = class(TRemotable) privat

Categories : Delphi

Using spring integration and soap/rest as inbounds, can generate completely automatic their wsdl/wadl?
Spring Integration uses Spring WebServices under the covers so you can use that to generate the WSDL from a schema as described in the Spring WebServices Documentation.

Categories : Rest

Generate a web application using maven generate
mvn dependency:tree This is used to view the dependency hierarchy of the project currently being built. It will output the resolved tree of dependencies that the Maven build process actually uses.

Categories : Java

JAXWS: Why would one generate the client code within maven through jaxws-maven-plugin?
Execution of maven plugins can be triggered automatically in a build step, e.g. there is dedicated a "generate sources" phase in the maven build cycle, right before compilation of the project. Therefore a developer will not have to remember to generate it manually, bringing you closer to the ideal one-click full build. The advantage is, that you can exclude the generated classes from the VCS, as they can be regenerated on demand. The problem with generated code in VCS is, that a change in the WSDL file will trigger changes in the generated code (obviously). But as you are working contract first, only the changes in the WSDL file are relevant. Excluding the generated code from the VCS will hide redundant changes in it from the VCS commit log. Your VCS repository is smaller and the commit l

Categories : Java

Failed to parse WSDL javax.wsdl.WSDLException: faultCode=PARSER_ERROR: Cannot create a secure XMLInputFactory
You are using a version of CXF that require a "Secure XMLInputFactory". WoodStox 4.2.0 provided such a XMLInputFactory. It looks like WoodStox 4.2.0 is already a dependency of CXF, so you must have another XMLInputFactory implementation that is picked up by the classloader before the WoodStox one. I had the same problem and for me it was a GlassFish implementation that caused the conflict. If you use Maven, check carefully your dependencies. At last you may debug into CXF. Put a breakpoint in org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory, then restart your server, you will see what jar contains the implementation that is used. Try remove this jar from WEB-INF/lib and see what's happen. see also CXF 2.7.x Woodstox Compatibility via Maven

Categories : Web Services

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL Couldn't load from 'http://88.XXX.XXX.XXX:8080/
Make sure that $this->ip is accessible from the server. In other words, from the dedicated server, make sure you can open up http://88.xxx.xxx.xxx:8080/SongBoxServeur/GestionSongBox?wsdl in a browser. If you can't, there's some networking configuration you need to attend to first.

Categories : PHP

creating proxy using wsdl programmatically and wsdl parsing
using System; using System.Collections.Generic; using System.Text; using System.Reflection; using System.CodeDom; using System.CodeDom.Compiler; using System.Security.Permissions; using System.Web.Services.Description; namespace ConnectionLib { public class WSProxy { [SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] public static object CallWebService(string webServiceAsmxUrl, string serviceName, string methodName, object[] args) { System.Net.WebClient client = new System.Net.WebClient(); // Connect To the web service System.IO.Stream stream = client.OpenRead(webServiceAsmxUrl + "?wsdl"); // Now read the WSDL file describing a service. ServiceDescription description = Serv

Categories : C#

Maven/Jenkins - trouble running Maven from Jenkins
So the issue was that the vdi was blocking me downloading the relevant jar and pom files. So what I did was run the task on my local machine, copied the files across to my vdi repo and for the jar files, I registered them with the following maven command: mvn install:install-file -Dfile=.libcom.ibm.mq.jar -DgroupId=com.ibm.mq -DartifactId=WebsphereMQClassesForJava -Dversion=7.0.1.5 -Dpackaging=jar

Categories : Maven

Wsimport not including wsdl in client jar when wsdl is from url
Can your try with this annotation in your client. @WebServiceClient(name = "WSClient", targetNamespace = "http://yournamespace.com", wsdlLocation ="META-INF/wsdl/WSClient.wsdl"

Categories : Java

Trouble binding Maven plugin to compile phase
Where is the pom.xml of the project you would automagically like to bind to the compile phase? Your project pom should have something like this in the build section. <build> <plugins> <plugin> <artifactId>jvmbasic-maven-plugin</artifactId> <version>${jvmbasic.version}</version> <configuration> <sourceDir>${maven.compiler.source}</sourceDir> <targetDir>${maven.compiler.target}</targetDir> </configuration> </plugin>

Categories : Java

Generate a summary with the Maven PMD plugin
As there didn't seem to be a direct solution, I made a workaround. The Maven PMD plugin itself is used to generate the XML report as part of the site report. Afterwards the XML Maven plugin is used with a XSLT from our old Ant-based configuration to transform the XML report and overwrite the site report for PMD. Not really clean, but it's working. Note that contrary to what I thought initially, Ant itself also did not print the reports as intended, a former co-worker added the XSLT to the old Ant target.

Categories : Java

Maven - generate archive of every dependency source
I needed to do something similar, except I also needed to filter the included sources to just those produced by teams at my company. You may use a combination of the maven-dependency-plugin and the maven-assembly-plugin to achieve this. Here's the configuration I use. <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <configuration> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> <executions> <execution> <id>retrieve-dependency-sources</id> <phase>process-sources</phase&g

Categories : Java

How to generate coverage report with JMockit and Maven?
You will need to also add the "jmockit" dependency, version 1.3 or newer (and before "junit" if that's the case). The JMockit Coverage documentation is indeed missing this detail; should be fixed soon.

Categories : Maven

How to generate multiple builds using Maven for one project
There are two ways you could create multiple output packages. One is to use the maven assembly plugin to create multiple archives. The other is to create a multi-module project and give each artifact it's own pom.xml. I would recommend the latter case as it embeds less assembly logic in your pom. In this case I would create at least three modules... one for the project artifact with no packaged dependencies and two others for that artifact plus the various dependency items.

Categories : Maven

Using XSD file in WSDL
XSD is the schema of your object you will be sending to you web service. Use command line below to create a serialized object from you XSD file. For example, lets assume your language is C#, and your web service is SendData() xsd.exe -c -l:c# -n:XmlSerializationHowTo yourobject.xsd This will create a class file called yourobject.cs In you code, reference your web service, and call SendData(yourobject); Note, you can also create sample xml from your xsd and vise versa.

Categories : C#

Maven, maven-assembly-plugin and scala-library.jar file
Yes it's normal. If you include scala-library.jar as jar in your jar then you should include a custom code to load into your main(...). java -jar xxx.jar ignore jar inside jar you have to create your own assembly description file with <unpack>false</unpack> on dependencySet (under binaries or root, I don't remember) + change main to load the jar from Resource (your main() should note depends of scala-library) you can use alternative to assembly, dedicated to this job (it includes code to launch jar), like (maven plugin for those tools should exists): onejar launch4j But my recommendation, it's to use Proguard : it will create a single jar like you current code, but it will shrink useless code (lot of part of scala-library). Try it manually (without maven-plugin first)

Categories : Scala

Can download jar file using maven+local repo, but not using maven+nexus?
First you misunderstood the meaning of Local Repository. Even you are using Nexus, you are still having a local repository. Local repository is simply a repository in your own machine to store all artifacts that Maven will use for build. In case a dependency is required and is not available in local repository, Maven will contact the remote repository to try to get the dependency. Once it is get, it is put in local repo so that Maven can continue its build process. One thing you may have misunderstood too: Even you removed the nexus setting, Maven is still going to download from a default remote repository, which is so-called Maven Central (http://repo.maven.apache.org/maven2). The whole problem , I believe, is simply you are not setting up your Maven correct to make use of the nexus

Categories : Maven

Why is Maven skipping over my custom generate-sources executions?
Ah, I was missing goals. The correct snippet would be: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> ... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <tasks>

Categories : Maven

Prevent Maven archetype generate from creating variable
You can add -Darchetype.filteredExtentions=extension1,extension2,... to your mvn command to tell maven which file extensions to include when it does its velocity substitutions. This filter includes file extensions, so you have make a list of all of your file extensions and leave off xml in order to skip over them. You can do -Darchetype.filteredExtentions if xml is the only file type in your project.

Categories : Maven

Parsing a WSDL file like XML?
WSDL is in fact a XML to describe and locate web services. It is not the content itself. Even though technically you can parse it, you should expect a XML file from server.

Categories : IOS

Running a .war and WSDL file
You can deploy the war file locally in any of the web containers such as Tomcat. If you want to do it on Tomcat then simply put the war file in Tomcat/webapps dir and start the tomcat form bin/startup.exe or bin/startup.sh. Once you have the war deployed, and I assume the webservices are part of that war, then you can try hitting the desired WSDL url on your local tomcat. If all goes fine, then URL should return the WSDL.

Categories : Java

Maven goal to generate test report using damage control
You should use goal provided by plugin. Maven provides only phase's, not goals So you should use phase test and goal report. <execution> <phase>test</phase> <goals> <goal>report</goal> </goals> </execution> report goal is declared in this file DamageControlMojo. /** * @goal report */

Categories : Maven

how to publish a web service which contains .WSDL file
You do not need the .WSDL file. You need the service to expose metadata. See <serviceMetadata>.

Categories : Web Services

Blank/Empty WSDL file
The following is a best guess based on some research I did - I'm not that familiar with RESTful WCF services, so I might be wrong but this should give you a starting point at least. You didn't specify, but it looks like you're trying to write a RESTful WCF service. I'm not entirely certain, because you use wsHttpBinding in your endpoint, but you also decorate the method in the service with [WebInvoke]. In any event, REST services do not have WSDLs - that's a SOAP thing. Additionally, I believe WCF supports REST with the webHttpBinding. As you are using WebServiceHostFactory in your .svc file, I think this is what is happening: You do not have any webHttpBinding endpoints defined. WCF will create a default webHttpBinding endpoint, with the address based on the location of the .svc fi

Categories : C#

Pointing wsdl file from pom.xml in webapp
You can refer path, using maven property ${basedir}. <wsdl>${basedir}/src/main/webapp/WSDL/NewWebService.wsdl</wsdl> or <file>${basedir}/src/main/webapp/WSDL/NewWebService.wsdl</file> or something else. (You didn't say anything about used maven-plugin)

Categories : Maven

How to make Maven's antrun task to generate sources from AIDL files?
I'm posting the way I did it for now, in case someone is looking for the same solution. Note that the code is not clean and not portable. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>generate-aidl</id> <phase>generate-sources</phase> <configuration> <target name="convert-aidl-files"> <property name="aidl" location="${env.ANDROID_HOME}/build-tools/android-4.2.2/aidl${exe}"/> <property name="framework.aidl" location="${env.ANDROID_HOME}/platforms/android-17/framework.aidl"/> <apply executable="${aidl}" parallel="false"> <arg value="-I$

Categories : Android

Does Enunicate maven plug-in could generate the data model which in other java project?
Check out the FAQ. The first question links to this document which teaches you how to "import" classes into the project.

Categories : Java

How can I find the WSDL file after a successful build?
WSDL's get placed by default in {module_root} argetgenerated-sourceswsdl You REALLY need to start including relevant info in your questions. You haven't even posted the relevant parts of your pom. Have you even told jax-ws to generate a wsdl? Also, fix the tonne of warnings getting spat out when you run your maven build. That just adds to the mess of info you are posting. EDIT: Go look up the documentation. You can explicitly state where the wsdls will end up. All of your questions have had simple answers which you could have found yourself with a minimal amount of effort on your part.

Categories : Java

How to create wsdl file to access api with soap?
Use Apache XSD to WSDL. Is the targetNameSpace the wsdl file on my server ? No; it's a namespace declaration that you make up. More info: here in this SO answer. Yes, you should change the soap:address from <soap:address location="http://www.examples.com/SayHello/"> to the correct address such as: <soap:address location="http://somewebsite:10806/SayHello/">

Categories : PHP

How to Identify a Required attribute from WSDL file?
Make sure that you rebuild your service project after you make the modifications. This is what I'm getting: <xs:sequence> <xs:element name="PickupDate" type="xs:dateTime"/> <xs:element minOccurs="0" name="PickupLocation" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="ReturnDate" type="xs:dateTime"/> <xs:element minOccurs="0" name="ReturnLocation" nillable="true" type="xs:string"/> </xs:sequence>

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.