Hi list,

I'm new with Geotools and I try to connect my java application  with geotools 
17.2 (gt-wfs-ng part) and a 1spatial Elyx 2.9.4 WFS 1.1.0 server. In read only, 
WFS works well. However if I try to send a WFS-T transaction, I have this 
stackstrace :

java.lang.IllegalArgumentException: Client does not support any of the server 
supported output formats for TRANSACTION
    at 
org.geotools.data.wfs.internal.AbstractWFSStrategy.getDefaultOutputFormat(AbstractWFSStrategy.java:386)
    at org.geotools.data.wfs.internal.WFSRequest.<init>(WFSRequest.java:75)
    at 
org.geotools.data.wfs.internal.TransactionRequest.<init>(TransactionRequest.java:49)
    at 
org.geotools.data.wfs.internal.WFSClient.createTransaction(WFSClient.java:323)
    at 
org.geotools.data.wfs.WFSRemoteTransactionState.commitInternal(WFSRemoteTransactionState.java:118)
    at 
org.geotools.data.wfs.WFSRemoteTransactionState.commit(WFSRemoteTransactionState.java:95)
    at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:186)

I think the problem is a bad WFS xml schema in this specific part :
<Operation name="Transaction">
<DCP>
<HTTP>
<Get p9:type="simple" 
p9:href="http://PORTAILCARTO-29:8100/ElyxRouter/rest/wfs/wfs"/>
<Post p9:type="simple" 
p9:href="http://PORTAILCARTO-29:8100/ElyxRouter/rest/wfs/wfs"/>
</HTTP>
</DCP>
<Parameter name="idgen"><Value>GenerateNew</Value></Parameter>
<Parameter name="outputFormat"><Value>text/xml; 
subtype=gml/3.1.1</Value></Parameter>
</Operation>

The schema show a parameter name "outputFormat" and the library search 
"inputFormat" in the 
org.geotools.data.wfs.internal.v1_x.StrictWFS_1_x_Strategy.getServerSupportedOutputFormats(WFSOperationType
 operation)

With a debugger I just force the "outputFormat" in parameterName in line 597 
and it's works well. Then I think a good workaround is a new WFS 
vendor-specific strategy who just change this specific line. But I don't 
understand if I can declare a new strategy because in 
org.geotools.data.wfs.internal.WFSClient.determineCorrectStrategy() the list 
seems hardcoded.

What can I do to use a custom strategy ?

Michael
La Ville de Liège décline toute responsabilité pour les dommages directs ou 
indirects résultant de la consultation ou de l'utilisation du contenu du 
présent courriel selon les termes du disclaimer repris sur le site de la Ville 
: http://www.liege.be/documents/disclaimer ​​Le destinataire est averti que le 
contenu de celui-ci peut ne représenter que l'avis de son expéditeur et non 
celui de la Ville de Liège.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to