I'm facing some trouble during create a SOAP client.
I have to use a BiPRO WebService (a normative communication pattern beween German insurance agencies).
That WebService has got a complex Datastructure and I think that the code generator has some problems with that structure.
I get following error message:
SAXParseException; [...] A class/interface with the same name "barmenia.LebenWs.CTElementarprodukt" is already in use. Use a class customization to resolve this conflict.
and following
[...] (Relevant to above error) another "CTElementarprodukt" is generated from here
After some research I figured out that using
autoNameResolution
would help. But if I do so, the classes are not generated correct (some properties are missing - that one the message above claimes about).
I'm using following maven plugin to generate the client:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>de.tj.msc.bipro.consumer.taa.tarifierung.services.clients.leben.barmenia.LebenWs</generatePackage>
<schemas>
<schema>
<url>
https://ws0.barmenia24.de/ibis/services/lebenservice_2.1.5.1.2?wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
I read something about using a xjb file.
But I do not have such a file.
It would be great if anybody could help me.
Thank you very much !
Best wishes
As commented, I would suggest to use a different JAX-WS/JAX-B generating library to check if you get the same errors - like the jaxws-maven-plugin, which is working perfectly fine in my projects (see the cxf-spring-boot-starter for example).
Related
How to send multiply time the same type in request soap mock services
<invoiceDatas>
<!--Zero or more repetitions:-->
<invoiceData>
<id>?</id>
<MPK>?</MPK>
<RK>?</RK>
<value>?</value>
</invoiceData>
</invoiceDatas>
i alwyas can send one row with this, but how to change to send for example 3 rows
cans omeone explain
in response i should have
<invoiceDatas>
<!--Zero or more repetitions:-->
<invoiceData>
<id>?</id>
<MPK>?</MPK>
<RK>?</RK>
<value>?</value>
</invoiceData>
<!--Zero or more repetitions:-->
<invoiceData>
<id>?</id>
<MPK>?</MPK>
<RK>?</RK>
<value>?</value>
</invoiceData>
<!--Zero or more repetitions:-->
<invoiceData>
<id>?</id>
<MPK>?</MPK>
<RK>?</RK>
<value>?</value>
</invoiceData>
</invoiceDatas>
how i can do that ?
i knwo the best oprion it is to copy this type but i want to this dynamic by groovy
I've read their documentation and I can't make heads or tails of it. It's so vague and assumes too much for it to be of much use. Using the manual request building process I don't think it's possible to create a repetitive expression in a Manual Request. You'd have to manually write out say 4 or 5 invoiceData nodes each with ? and then fill those in using their Form UI. But you couldn't create a repetition expression (forEach, each, etc) for N items using that method.
So you have to switch to Groovy script, but the documentation there is entirely unhelpful. Using a groovy script I couldn't even get to building a simple request equivalent to what the Manual Request gave you. I think you're best bet is to ask on their forum for help: https://community.smartbear.com/t5/SoapUI-Open-Source/ct-p/soapui-os-community
Beyond that I'd just cut my losses with that tool and go with another more programmer friendly library like: https://github.com/jwagenleitner/groovy-wslite
It's an older library, but I recently used it and I liked it. It was low barrier to get coding, worked without a lot of effort, and had a very low number of dependencies. It's not really supported and uses deprecated classes if you're working Groovy 3 or 4, but it's still quite usable and useful for SOAP.
I am trying to speed up execution of code being debugged with JRebel. In particular, I notice that framework code is slow. I am wondering whether I can tell JRebel to ignore certain packages, in much the same way that we can setup JProfiler to ignore certain packages and patterns.
You most definitely can.
Use a system property (or add to jrebel.properties) meant just for that purpose. More information at JRebel agent properties.
-Drebel.exclude_packages=PACKAGE1,PACKAGE2,...
Specify the excluded packages in rebel.xml using Ant-styled patterns. More information at rebel.xml configuration.
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">
<classpath>
<dir name="/path/to/module/build/directory/root">
<exclude name="com/yourapp/package1/internal/**"/>
</dir>
</classpath>
</application>
Both ways work similarly but since the second one enables to customize each module inividually it is generally preferred.
I've just started playing with PyAIML. My notes are at http://webseitz.fluxent.com/wiki/AIML.
I'm trying to use a starting AIML file that loads a whole directory of AIML files. But getting the You are not permitted to load AIML sets response. Even after adding k.setBotPredicate("secure", "yes") in the code.
What am I missing?
This is my first time creating Asynchronous Web Service clients. I have my wsdl file but I'm confused where to put:
<enableAsyncMapping>true</enableAsyncMapping>
Based on research, this is how to add it:
<bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="AddNumbers.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws">
<bindings node="wsdl:definitions">
<package name="examples.webservices.async"/>
<enableAsyncMapping>true</enableAsyncMapping>
</bindings>
</bindings>
Should this be in a separate file or something? I read about the bindings file but still confused how to use it.
or can it be placed in the same WSDL file itself?
I am using the wsimport command to generate the client classes
I know it is old, but I needed it and google sent me here. It might help someone else in the future.
Using suggestions in one of the answers of this related question on wsimport, I created a custom xml file async.xml like this:
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
</jaxws:bindings>
And used wsdl2java with the following options (-b async.xml):
wsdl2java -client -d ClientDir -b async.xml myservice.wsdl
And I got the same (and more) version of the stubs returning Future<?>:
public Future<?> authorize
Cheers
In Junit, I know there is a #beforeclass , #before annotation, do we have a annotation or design,
allow us to write a method to run ONLY once before the whole testing process?
we have a script, which setup some database data (config, static, lookup table etc.....) for the test, but its too expensive to run before each individual test, we would like it to set it, only once before start running any test.
thanks!
Since you tagged your question with maven, I'll go this way: you could use the pre-integration-test phase to run this one-time expensive script (symmetrically, you clean up in post-integration-test).
You could use exec-maven-plugin for this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>...</version>
<executions>
<execution>
<id>some-execution</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable><!-- runnable command or file name here --></executable>
</configuration>
</plugin>
JUnit does not have this kind of annotation, because it does not make any assumption about the environment: its goal is to test one class at a time in an isolated manner.
DBUnit provides exactly the thing you are looking for. Its a JUnit extension only.
It has setUp operation options like Clean_Insert - which means the db will be cleaned and required data will be automatically insterted. and many others like Refresh, Update, Insert etc
Event easier is - In order to use Dbunit you are not required to extend the DBTestCase class. You can override the standard JUnit setUp() method and execute the desired operation on your database.
database configuration operation
alot of options on dataset - flat, xml, database , streaming